Vitalii Kryvenko

Results 283 comments of Vitalii Kryvenko

`3.0.0-rc` version was published. I'll prepare a blog post for the release and switch it to `3.0.0` on November 13-th

@scampi is there any plan to stabilize this option? At least ensuring single whitespace after `//` would be very useful for my use-case...

Hi, thank you for creating the issue! Unfortunately, this isn't possible with the current design of the builder struct's type signature. The builder struct captures the generic parameters eagerly. In...

I see. Well, another way to work around this is to wrap the value in `Option` and defaulting internally: ```rust fn foo(arg: Option) { if let Some(arg) = arg {...

Interesting idea... Although in general case, and after desugaring this should work with named generic types and the user needs to clarify the exact type of the default value: ```rust...

A problem with this approach.. How should the finishing function be written? ```rust impl FooBuilder { fn call(self) { let arg: T = self.arg.unwrap_or_else(|| default_expression); __orig_foo(arg) } } ``` This...

> The value shouldn't be set to default at the end, but at the beginning That's unacceptable. Imagine the default value performs some complex computation or allocation. Calculating it eagerly...

I could make it work like this with a `transmute` (although it doesn't compile because the names of internal builder fields are generated with random words in them to ensure...

There is a lot to research and experiment with here. I don't see an obvious design that would fit into the existing model without compromising some existing features, but maybe...

Thank you for bringing this up! This is something I was also thinking about. For example [`typed-builder`](https://docs.rs/typed-builder/latest/typed_builder/derive.TypedBuilder.html) provides `#[builder(setter(transform = |x: f32, y: f32| Point { x, y }))]` attribute...