You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With latest commits questions 1 and 2 are addressed.
As for question 3:
The rust API guidelines on conversion state:
Conversions prefixed as_ and into_ typically decrease abstraction, either exposing a view into the underlying representation (as) or deconstructing data into its underlying representation (into).
Conversions prefixed to_, on the other hand, typically stay at the same level of abstraction but do some work to change from one representation to another.
So I re-read the linked page (which incidentally I could only find by coming back here, no matter what combinatin of google search terms I used, I couldn't find it again :/) and something stands out, namely that into is for owned->owned, and will consume the input.
That looks exactly like what your functions are doing:
implInterval<ZeroBased,HalfOpen>{pubfnto<ToBs:Basis,ToEd:End>(&self) -> Interval<ToBs,ToEd>{letmut ret = Interval::<ToBs,ToEd>::from_int(self.start.pos,self.end.pos);if !ToBs::IS_ZERO_BASED{
ret.start.pos += 1;
ret.end.pos += 1;}if !ToEd::IS_EXCLUSIVE{
ret.end.pos -= 1;}
ret
}}
bkind
necessary in theCoordinates
typeCoordinates
toInterval
to
beinto
?The text was updated successfully, but these errors were encountered: