Remove unnecessary into_iter/collect (#3667)
* Remove unnecessary into_iter/collect flags and isa_flags were already of the correct type in HashedEngineCompileEnv's implementation. * Cargo fmt
This commit is contained in:
@@ -942,21 +942,11 @@ struct HashedEngineCompileEnv<'a>(&'a Engine);
|
|||||||
#[cfg(all(feature = "cache", compiler))]
|
#[cfg(all(feature = "cache", compiler))]
|
||||||
impl std::hash::Hash for HashedEngineCompileEnv<'_> {
|
impl std::hash::Hash for HashedEngineCompileEnv<'_> {
|
||||||
fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
|
fn hash<H: std::hash::Hasher>(&self, hasher: &mut H) {
|
||||||
use std::collections::BTreeMap;
|
|
||||||
|
|
||||||
// Hash the compiler's state based on its target and configuration.
|
// Hash the compiler's state based on its target and configuration.
|
||||||
let compiler = self.0.compiler();
|
let compiler = self.0.compiler();
|
||||||
compiler.triple().hash(hasher);
|
compiler.triple().hash(hasher);
|
||||||
compiler
|
compiler.flags().hash(hasher);
|
||||||
.flags()
|
compiler.isa_flags().hash(hasher);
|
||||||
.into_iter()
|
|
||||||
.collect::<BTreeMap<_, _>>()
|
|
||||||
.hash(hasher);
|
|
||||||
compiler
|
|
||||||
.isa_flags()
|
|
||||||
.into_iter()
|
|
||||||
.collect::<BTreeMap<_, _>>()
|
|
||||||
.hash(hasher);
|
|
||||||
|
|
||||||
// Hash configuration state read for compilation
|
// Hash configuration state read for compilation
|
||||||
let config = self.0.config();
|
let config = self.0.config();
|
||||||
|
|||||||
Reference in New Issue
Block a user