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
When implementing size_hint for a vector or a set we don't want to iterate on all the values to actually get a hint.
One way to do so would be to have two method one taking a value size_hint(&self) and another one taking no value maxium_size().
thus they would be used as such:
maximum_size() used on set of values
size_hint(&self) used on individual values,
size_hint(&self) (thought maybe renamed) would default implementation to maximum_size()
The text was updated successfully, but these errors were encountered:
When implementing size_hint for a vector or a set we don't want to iterate on all the values to actually get a hint.
One way to do so would be to have two method one taking a value
size_hint(&self)
and another one taking no valuemaxium_size()
.thus they would be used as such:
size_hint(&self) (thought maybe renamed) would default implementation to maximum_size()
The text was updated successfully, but these errors were encountered: