File tree Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -215,15 +215,7 @@ impl CStore {
215
215
debug ! ( " hash[{}]: {}" , x. name, x. hash) ;
216
216
}
217
217
218
- let mut hashes = ~[ ] ;
219
- for ch in result. move_iter ( ) {
220
- let crate_hash {
221
- hash,
222
- ..
223
- } = ch;
224
- hashes. push ( hash)
225
- }
226
- hashes
218
+ result. move_iter ( ) . map ( |crate_hash { hash, ..} | hash) . collect ( )
227
219
}
228
220
}
229
221
Original file line number Diff line number Diff line change @@ -878,16 +878,13 @@ fn path_to_str(p: &ast::Path) -> ~str {
878
878
879
879
let mut s = ~"";
880
880
let mut first = true ;
881
- for i in p. segments . iter ( ) . map ( |x| {
882
- let string = token:: get_ident ( x. identifier . name ) ;
883
- string. get ( ) . to_str ( )
884
- } ) {
881
+ for i in p. segments . iter ( ) . map ( |x| token:: get_ident ( x. identifier . name ) ) {
885
882
if !first || p. global {
886
883
s. push_str ( "::" ) ;
887
884
} else {
888
885
first = false ;
889
886
}
890
- s. push_str ( i) ;
887
+ s. push_str ( i. get ( ) ) ;
891
888
}
892
889
s
893
890
}
Original file line number Diff line number Diff line change @@ -554,13 +554,6 @@ pub struct InternedString {
554
554
priv string : RcStr ,
555
555
}
556
556
557
- #[ unsafe_destructor]
558
- impl Drop for InternedString {
559
- fn drop ( & mut self ) {
560
- // No-op just to make this not implicitly copyable.
561
- }
562
- }
563
-
564
557
impl InternedString {
565
558
#[ inline]
566
559
pub fn new ( string : & ' static str ) -> InternedString {
You can’t perform that action at this time.
0 commit comments