dev: hash imports of expr info (#756)

This commit is contained in:
Myriad-Dreamin 2024-10-31 23:27:59 +08:00 committed by GitHub
parent 8f3566366e
commit 67367b03bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -158,6 +158,9 @@ impl std::hash::Hash for ExprInfo {
self.source.hash(state);
self.exports.hash(state);
self.root.hash(state);
let mut imports = self.imports.iter().collect::<Vec<_>>();
imports.sort_by_key(|(k, _)| *k);
imports.hash(state);
}
}