]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #69471 - nnethercote:rm-sip-Hasher-short_write, r=dtolnay
authorDylan DPC <dylan.dpc@gmail.com>
Sun, 15 Mar 2020 01:44:15 +0000 (02:44 +0100)
committerGitHub <noreply@github.com>
Sun, 15 Mar 2020 01:44:15 +0000 (02:44 +0100)
commit0619e4649d35e979afdc29277a7f8c048210e132
treea11f9dde26c53ab33d8d62ba8ed42ddef6b5db78
parent62c057911640a269a8bbb1a4a814c146906194ce
parent54d1c50c7e7b4c4c7dca6c85c6965c886922b449
Rollup merge of #69471 - nnethercote:rm-sip-Hasher-short_write, r=dtolnay

Remove `sip::Hasher::short_write`.

`sip::Hasher::short_write` is currently unused. It is called by
`sip::Hasher::write_{u8,usize}`, but those methods are also unused,
because `DefaultHasher`, `SipHasher` and `SipHasher13` don't implement
any of the `write_xyz` methods, so all their write operations end up
calling `sip::Hasher::write`.

(I confirmed this by inserting a `panic!` in `sip::Hasher::short_write`
and running the tests -- they all passed.)

The alternative would be to add all the missing `write_xyz` methods.
This does give some significant speed-ups, but it hurts compile times a
little in some cases. See #69152 for details. This commit does the
conservative thing and doesn't change existing behaviour.

r? @rust-lang/libs
src/libcore/hash/sip.rs