Closed Veetaha closed 2 months ago
Hi,
Nice, looking good. I'm also into the camp preferring opt in for into conversions.
I'm not too worried about breaking the builders by removing automatic into conversions. I think it makes sense to keep Into for EffectTimer
, but the rest are probably better served without.
Hi! I'm the maintainer of the
bon
crate. I've created a 2.0 release with some breaking changes. While there aren't too many repos usingbon
, I'm assisting with the upgrade myself.There is the link to the Reddit post and the blog post itself.
The main breaking change that requires a migration is that there will no longer be automatic
Into
conversions (https://github.com/elastio/bon/issues/15#issuecomment-2297202745). It means there won't be automaticimpl Into<String>
in setters. If you want to enableimpl Into
for allString
types, you need to use#[builder(on(String, into))]
at the top level or add#[builder(into)]
at the member level.Also, any feedback on this change would be appreciated!
I see there are a lot of usages of
#[builder]
inpub
items. It means a lot of setters now acceptimpl Into<_>
. Do you think it makes sense to review all the setters and removeimpl Into<_>
from them (which would be a breaking change for the crate), or should we just enableimpl Into
everywhere wherebon
v1 enabled it automatically?