File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,23 @@ extension AbsoluteConfigKey {
182
182
/// Returns a new absolute configuration key by prepending the given relative key.
183
183
/// - Parameter prefix: The relative configuration key to prepend to this key.
184
184
/// - Returns: A new absolute configuration key with the prefix prepended.
185
- internal func prepending( _ prefix: ConfigKey ) -> AbsoluteConfigKey {
185
+ public func prepending( _ prefix: ConfigKey ) -> AbsoluteConfigKey {
186
186
var prefixedComponents = prefix. components
187
187
prefixedComponents. append ( contentsOf: self . components)
188
188
var mergedContext = prefix. context
189
189
mergedContext. merge ( self . context) { $1 }
190
190
return AbsoluteConfigKey ( prefixedComponents, context: mergedContext)
191
191
}
192
+
193
+ /// Returns a new absolute configuration key by appending the given relative key.
194
+ /// - Parameter relative: The relative configuration key to append to this key.
195
+ /// - Returns: A new absolute configuration key with the relative key appended.
196
+ public func appending( _ relative: ConfigKey ) -> AbsoluteConfigKey {
197
+ var appended = self
198
+ appended. components. append ( contentsOf: relative. components)
199
+ appended. context. merge ( relative. context) { $1 }
200
+ return appended
201
+ }
192
202
}
193
203
194
204
extension AbsoluteConfigKey : ExpressibleByArrayLiteral {
You can’t perform that action at this time.
0 commit comments