Don't convert hash to string.

This commit is contained in:
Josh Matthews 2019-01-28 15:56:13 -05:00 committed by GitHub
parent 4168227382
commit 21e10b201a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,7 +174,7 @@ impl fmt::Debug for ServoUrl {
if self.0.as_str().len() > 40 {
let hasher = DefaultHasher::new();
let truncated: String = self.0.as_str().chars().take(40).collect();
let result = format!("{}... ({:x})", truncated, hasher.finish().to_string());
let result = format!("{}... ({:x})", truncated, hasher.finish());
return result.fmt(formatter);
}
self.0.fmt(formatter)