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 {
182182 /// Returns a new absolute configuration key by prepending the given relative key.
183183 /// - Parameter prefix: The relative configuration key to prepend to this key.
184184 /// - Returns: A new absolute configuration key with the prefix prepended.
185- internal func prepending( _ prefix: ConfigKey ) -> AbsoluteConfigKey {
185+ public func prepending( _ prefix: ConfigKey ) -> AbsoluteConfigKey {
186186 var prefixedComponents = prefix. components
187187 prefixedComponents. append ( contentsOf: self . components)
188188 var mergedContext = prefix. context
189189 mergedContext. merge ( self . context) { $1 }
190190 return AbsoluteConfigKey ( prefixedComponents, context: mergedContext)
191191 }
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+ }
192202}
193203
194204extension AbsoluteConfigKey : ExpressibleByArrayLiteral {
You can’t perform that action at this time.
0 commit comments