mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
auto merge of #11247 : eddyb/rust/symbol-cleanup, r=alexcrichton
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
use std::str;
|
||||
use std::io;
|
||||
use std::io::fs;
|
||||
use extra::hex::ToHex;
|
||||
use extra::tempfile::TempDir;
|
||||
use syntax::abi;
|
||||
use syntax::ast;
|
||||
@@ -490,8 +491,10 @@ fn crate_hash(symbol_hasher: &mut Sha256, crateid: &CrateId) -> @str {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn truncated_hash_result(symbol_hasher: &mut Sha256) -> ~str {
|
||||
symbol_hasher.result_str()
|
||||
fn truncated_hash_result(symbol_hasher: &mut Sha256) -> ~str {
|
||||
let output = symbol_hasher.result_bytes();
|
||||
// 64 bits should be enough to avoid collisions.
|
||||
output.slice_to(8).to_hex()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user