Changes from the review of the @str PR.
This commit is contained in:
parent
f502576fc7
commit
e0c1707560
|
@ -215,15 +215,7 @@ impl CStore {
|
||||||
debug!(" hash[{}]: {}", x.name, x.hash);
|
debug!(" hash[{}]: {}", x.name, x.hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut hashes = ~[];
|
result.move_iter().map(|crate_hash { hash, ..}| hash).collect()
|
||||||
for ch in result.move_iter() {
|
|
||||||
let crate_hash {
|
|
||||||
hash,
|
|
||||||
..
|
|
||||||
} = ch;
|
|
||||||
hashes.push(hash)
|
|
||||||
}
|
|
||||||
hashes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -878,16 +878,13 @@ fn path_to_str(p: &ast::Path) -> ~str {
|
||||||
|
|
||||||
let mut s = ~"";
|
let mut s = ~"";
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
for i in p.segments.iter().map(|x| {
|
for i in p.segments.iter().map(|x| token::get_ident(x.identifier.name)) {
|
||||||
let string = token::get_ident(x.identifier.name);
|
|
||||||
string.get().to_str()
|
|
||||||
}) {
|
|
||||||
if !first || p.global {
|
if !first || p.global {
|
||||||
s.push_str("::");
|
s.push_str("::");
|
||||||
} else {
|
} else {
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
s.push_str(i);
|
s.push_str(i.get());
|
||||||
}
|
}
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
|
@ -554,13 +554,6 @@ pub struct InternedString {
|
||||||
priv string: RcStr,
|
priv string: RcStr,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unsafe_destructor]
|
|
||||||
impl Drop for InternedString {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
// No-op just to make this not implicitly copyable.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl InternedString {
|
impl InternedString {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(string: &'static str) -> InternedString {
|
pub fn new(string: &'static str) -> InternedString {
|
||||||
|
|
Loading…
Reference in New Issue