Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Register as a singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
siemensikkema committed Jun 20, 2018
1 parent 6cff065 commit d67df3a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public final class MutableLeafTagConfigProvider: Provider {
public func register(_ services: inout Services) throws {
// register LeafProvider here to ensure it does not override our `LeafTagConfig`.
try services.register(LeafProvider())
services.register(MutableLeafTagConfig())
services.register { container -> LeafTagConfig in
let mutableConfig = try container.make(MutableLeafTagConfig.self)
let mutableConfig: MutableLeafTagConfig = try container.make()
var config = LeafTagConfig.default()
config.use(mutableConfig.storage)
return config
Expand Down

0 comments on commit d67df3a

Please sign in to comment.