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
This looks like it's calling .type_id() on a Box<dyn RandomSource> (not on the underlying trait object), and as a result always returns the fixed TypeId of the box. Therefore this function can never return Err(false). The documentation for it however says:
If the source has already been specified Err is returned with a bool indicating if the set failed because method was previously invoked (true) or if the default source is already being used (false).
I'm currently working on improving clippy's type_id_on_box lint and it found this instance
The text was updated successfully, but these errors were encountered:
aHash/src/random_state.rs
Line 192 in 7778357
This looks like it's calling
.type_id()
on aBox<dyn RandomSource>
(not on the underlying trait object), and as a result always returns the fixedTypeId
of the box. Therefore this function can never returnErr(false)
. The documentation for it however says:I'm currently working on improving clippy's
type_id_on_box
lint and it found this instanceThe text was updated successfully, but these errors were encountered: