Open alexmozaidze opened 2 years ago
ConfigBuilder's functions should return self, this will be especially convenient to use
ConfigBuilder::new().set_time_offset_to_local()
It doesn't need written two extra lines:
let mut builder = ConfigBuilder::new();
builder.set_time_offset_to_local()
... builder ...
Change ConfigBuilder return itself #103
There's a thing in Rust called builder pattern which is super convinient to build a struct in-place,
ConfigBuilder
, however, doesn't do that, it instead needs a mutable reference, can you add methods to constructConfigBuilder
in-place? I also think that readingConfigBuilder
docs is a bit of a pain when every option starts withset_
, it makes it harder to read.