@@ -172,10 +172,6 @@ public final class Configuration {
172
172
}
173
173
}
174
174
175
- public func reset( ) {
176
- settings. forEach { $0. reset ( ) }
177
- }
178
-
179
175
// MARK: - Helpers
180
176
181
177
public func apply< T: Equatable > ( _ path: KeyPath < Configuration , Setting < T > > , _ value: T ) {
@@ -186,35 +182,9 @@ public final class Configuration {
186
182
}
187
183
}
188
184
189
- private var _indexExcludeMatchers : [ FilenameMatcher ] ?
190
- public var indexExcludeMatchers : [ FilenameMatcher ] {
191
- if let _indexExcludeMatchers {
192
- return _indexExcludeMatchers
193
- }
194
-
195
- let matchers = buildFilenameMatchers ( with: indexExclude)
196
- _indexExcludeMatchers = matchers
197
- return matchers
198
- }
199
-
200
- private var _retainFilesMatchers : [ FilenameMatcher ] ?
201
- public var retainFilesMatchers : [ FilenameMatcher ] {
202
- if let _retainFilesMatchers {
203
- return _retainFilesMatchers
204
- }
205
-
206
- let matchers = buildFilenameMatchers ( with: retainFiles)
207
- _retainFilesMatchers = matchers
208
- return matchers
209
- }
210
-
211
- public func resetMatchers( ) {
212
- _indexExcludeMatchers = nil
213
- _retainFilesMatchers = nil
214
- }
215
-
185
+ public lazy var indexExcludeMatchers : [ FilenameMatcher ] = buildFilenameMatchers ( with: indexExclude)
186
+ public lazy var retainFilesMatchers : [ FilenameMatcher ] = buildFilenameMatchers ( with: retainFiles)
216
187
public lazy var reportExcludeMatchers : [ FilenameMatcher ] = buildFilenameMatchers ( with: reportExclude)
217
-
218
188
public lazy var reportIncludeMatchers : [ FilenameMatcher ] = buildFilenameMatchers ( with: reportInclude)
219
189
220
190
// MARK: - Private
@@ -255,7 +225,6 @@ protocol AbstractSetting {
255
225
var hasNonDefaultValue : Bool { get }
256
226
var wrappedValue : Value { get }
257
227
258
- func reset( )
259
228
func assign( _ value: Any )
260
229
}
261
230
@@ -293,10 +262,6 @@ protocol AbstractSetting {
293
262
public func assign( _ newValue: Any ) {
294
263
value = setter ( newValue) ?? defaultValue
295
264
}
296
-
297
- func reset( ) {
298
- wrappedValue = defaultValue
299
- }
300
265
}
301
266
302
267
private let filePathSetter : ( Any ) -> FilePath ? = { value in
0 commit comments