@@ -52,7 +52,7 @@ use core::*;
52
52
use core::dvec::DVec;
53
53
use core::io::WriterUtil;
54
54
use core::result::{Ok, Err};
55
- use core::send_map ::linear::LinearMap;
55
+ use core::hashmap ::linear::LinearMap;
56
56
use std::getopts::{optflag, optopt, opt_present};
57
57
use std::map::HashMap;
58
58
use std::{map, json, tempfile, term, sort, getopts};
@@ -465,19 +465,19 @@ fn parse_source(name: ~str, j: &json::Json) -> @Source {
465
465
466
466
match *j {
467
467
json::Object(j) => {
468
- let mut url = match j.find (&~"url") {
468
+ let mut url = match j.find_copy (&~"url") {
469
469
Some(json::String(u)) => u,
470
470
_ => fail ~"needed 'url' field in source"
471
471
};
472
- let method = match j.find (&~"method") {
472
+ let method = match j.find_copy (&~"method") {
473
473
Some(json::String(u)) => u,
474
474
_ => assume_source_method(url)
475
475
};
476
- let key = match j.find (&~"key") {
476
+ let key = match j.find_copy (&~"key") {
477
477
Some(json::String(u)) => Some(u),
478
478
_ => None
479
479
};
480
- let keyfp = match j.find (&~"keyfp") {
480
+ let keyfp = match j.find_copy (&~"keyfp") {
481
481
Some(json::String(u)) => Some(u),
482
482
_ => None
483
483
};
@@ -512,7 +512,7 @@ fn try_parse_sources(filename: &Path, sources: map::HashMap<~str, @Source>) {
512
512
}
513
513
514
514
fn load_one_source_package(src: @Source, p: &json::Object) {
515
- let name = match p.find (&~"name") {
515
+ let name = match p.find_copy (&~"name") {
516
516
Some(json::String(n)) => {
517
517
if !valid_pkg_name(n) {
518
518
warn(~"malformed source json: "
@@ -529,7 +529,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
529
529
}
530
530
};
531
531
532
- let uuid = match p.find (&~"uuid") {
532
+ let uuid = match p.find_copy (&~"uuid") {
533
533
Some(json::String(n)) => {
534
534
if !is_uuid(n) {
535
535
warn(~"malformed source json: "
@@ -545,15 +545,15 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
545
545
}
546
546
};
547
547
548
- let url = match p.find (&~"url") {
548
+ let url = match p.find_copy (&~"url") {
549
549
Some(json::String(n)) => n,
550
550
_ => {
551
551
warn(~"malformed source json: " + src.name + ~" (missing url)");
552
552
return;
553
553
}
554
554
};
555
555
556
- let method = match p.find (&~"method") {
556
+ let method = match p.find_copy (&~"method") {
557
557
Some(json::String(n)) => n,
558
558
_ => {
559
559
warn(~"malformed source json: "
@@ -562,13 +562,13 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
562
562
}
563
563
};
564
564
565
- let reference = match p.find (&~"ref") {
565
+ let reference = match p.find_copy (&~"ref") {
566
566
Some(json::String(n)) => Some(n),
567
567
_ => None
568
568
};
569
569
570
570
let mut tags = ~[];
571
- match p.find (&~"tags") {
571
+ match p.find_copy (&~"tags") {
572
572
Some(json::List(js)) => {
573
573
for js.each |j| {
574
574
match *j {
@@ -580,7 +580,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
580
580
_ => ()
581
581
}
582
582
583
- let description = match p.find (&~"description") {
583
+ let description = match p.find_copy (&~"description") {
584
584
Some(json::String(n)) => n,
585
585
_ => {
586
586
warn(~"malformed source json: " + src.name
@@ -1619,7 +1619,7 @@ fn dump_cache(c: &Cargo) {
1619
1619
need_dir(&c.root);
1620
1620
1621
1621
let out = c.root.push("cache.json");
1622
- let _root = json::Object(~LinearMap());
1622
+ let _root = json::Object(~LinearMap::new ());
1623
1623
1624
1624
if os::path_exists(&out) {
1625
1625
copy_warn(&out, &c.root.push("cache.json.old"));
@@ -1640,10 +1640,10 @@ fn dump_sources(c: &Cargo) {
1640
1640
1641
1641
match io::buffered_file_writer(&out) {
1642
1642
result::Ok(writer) => {
1643
- let mut hash = ~LinearMap();
1643
+ let mut hash = ~LinearMap::new ();
1644
1644
1645
1645
for c.sources.each |k, v| {
1646
- let mut chash = ~LinearMap();
1646
+ let mut chash = ~LinearMap::new ();
1647
1647
1648
1648
chash.insert(~"url", json::String(v.url));
1649
1649
chash.insert(~"method", json::String(v.method));
0 commit comments