From 44a595f52ca0dec2cf7a08ba182ce9f1eb637795 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 16 Nov 2019 11:59:46 +0100 Subject: Simplify impl for SymbolStr. --- src/libsyntax_pos/symbol.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libsyntax_pos') diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index f6377633857..d885133db65 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -1157,8 +1157,7 @@ impl fmt::Display for SymbolStr { impl HashStable for SymbolStr { #[inline] fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) { - let str = self as &str; - str.hash_stable(hcx, hasher) + self.string.hash_stable(hcx, hasher) } } -- cgit 1.4.1-3-g733a5