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
Since #36815, using SipHasher::new_with_keys gives a warning:
warning: use of deprecated item: use `DefaultHasher` instead, #[warn(deprecated)] on by default
But DefaultHasher does not have a new_with_keys method or anything similar. It looks like this functionality was deprecated without replacement. Assuming the libs team does not want to revisit this decision, the deprecation message should be changed to… something.
Right now, the easiest "fix" for code using this method is to use #[allow(deprecated)]. Since the method is marked #[stable] it’s not going away any time soon, so this is quite safe. But of course, recommending #[allow(deprecated)] in a deprecation message would defeat the point of deprecation.
Perhaps a "proper" fix would be to maintain a (non-deprecated) copy of SipHasher on crates.io?
One notable user of this method is phf. CC @sfackler
The text was updated successfully, but these errors were encountered:
Since #36815, using
SipHasher::new_with_keys
gives a warning:But
DefaultHasher
does not have anew_with_keys
method or anything similar. It looks like this functionality was deprecated without replacement. Assuming the libs team does not want to revisit this decision, the deprecation message should be changed to… something.Right now, the easiest "fix" for code using this method is to use
#[allow(deprecated)]
. Since the method is marked#[stable]
it’s not going away any time soon, so this is quite safe. But of course, recommending#[allow(deprecated)]
in a deprecation message would defeat the point of deprecation.Perhaps a "proper" fix would be to maintain a (non-deprecated) copy of
SipHasher
on crates.io?One notable user of this method is
phf
. CC @sfacklerThe text was updated successfully, but these errors were encountered: