Closed levibostian closed 4 years ago
Right now, Sourcery's default AutoLense template is good, but it could be more convenient.
Before:
protocol Foo: AutoLense { let id: String } var foo = Foo(id: "123") foo = Foo.idLense.set("new-id", foo)
After:
protocol Foo: AutoLense { let id: String } var foo = Foo(id: "123") foo = Foo.idLense.set("new-id", foo) ...all of the previous stuff, plus... let foo = Foo(id: "123).idLense.set("new-id")
A convenient way to be a builder for a new instance where it passes in self for me.
self
Right now, Sourcery's default AutoLense template is good, but it could be more convenient.
Before:
After:
A convenient way to be a builder for a new instance where it passes in
self
for me.