Skip to content

Commit

Permalink
auto merge of #11247 : eddyb/rust/symbol-cleanup, r=alexcrichton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jan 1, 2014
2 parents 7fc4df3 + 4e75265 commit 736f5a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use std::run;
use std::str;
use std::io;
use std::io::fs;
use extra::hex::ToHex;
use extra::tempfile::TempDir;
use syntax::abi;
use syntax::ast;
Expand Down Expand Up @@ -490,8 +491,10 @@ pub fn build_link_meta(sess: Session,
}
}

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()
}


Expand Down

0 comments on commit 736f5a8

Please sign in to comment.