Closed burrbull closed 2 years ago
r? @therealprof
(rust-highfive has picked a reviewer for you, use r? to override)
Could you elaborate why something like
Into<T>
is problematic? If you already haveT
, as you would need to have if we merged this, thenInto<T>
should always be available, right? What am I missing?
If you look at fugit::ExtU32 it let you pass 10.millis()
type inference for automatic detecting of NOM
and DENOM
regardless of the resulting type. It works very well if resulting type is known (without any Into<T>
). If you don't know resulting type than type inference don't work and you need to specify it by hand.
Saying about embedded-time
Into<T>
works only for part of conversions. Other require TryInto<T>
Thank you for bringing this up @burrbull. As we agreed yesterday to merge #324 and thus remove the traits for now, I will close this. However, we should definitely remember about this when we discuss the associated type constraints when adding the traits back. Please bring this back up for proper discussion then if we forget about it.
If you look at fugit::ExtU32 it let you pass
10.millis()
type inference for automatic detecting ofNOM
andDENOM
regardless of the resulting type. It works very well if resulting type is known (without anyInto<T>
). If you don't know resulting type than type inference don't work and you need to specify it by hand.
Looks like this was fixed. But can't understand how.
Reason:
fugit
uses it's own convertion technic and works bad withInto
. Same asembedded-time
don't useInto
for potentially fallible convertions