@@ -52,7 +52,7 @@ use core::*;
5252use core::dvec::DVec;
5353use core::io::WriterUtil;
5454use core::result::{Ok, Err};
55- use core::send_map ::linear::LinearMap;
55+ use core::hashmap ::linear::LinearMap;
5656use std::getopts::{optflag, optopt, opt_present};
5757use std::map::HashMap;
5858use std::{map, json, tempfile, term, sort, getopts};
@@ -465,19 +465,19 @@ fn parse_source(name: ~str, j: &json::Json) -> @Source {
465465
466466 match *j {
467467 json::Object(j) => {
468- let mut url = match j.find (&~"url") {
468+ let mut url = match j.find_copy (&~"url") {
469469 Some(json::String(u)) => u,
470470 _ => fail ~"needed 'url' field in source"
471471 };
472- let method = match j.find (&~"method") {
472+ let method = match j.find_copy (&~"method") {
473473 Some(json::String(u)) => u,
474474 _ => assume_source_method(url)
475475 };
476- let key = match j.find (&~"key") {
476+ let key = match j.find_copy (&~"key") {
477477 Some(json::String(u)) => Some(u),
478478 _ => None
479479 };
480- let keyfp = match j.find (&~"keyfp") {
480+ let keyfp = match j.find_copy (&~"keyfp") {
481481 Some(json::String(u)) => Some(u),
482482 _ => None
483483 };
@@ -512,7 +512,7 @@ fn try_parse_sources(filename: &Path, sources: map::HashMap<~str, @Source>) {
512512}
513513
514514fn load_one_source_package(src: @Source, p: &json::Object) {
515- let name = match p.find (&~"name") {
515+ let name = match p.find_copy (&~"name") {
516516 Some(json::String(n)) => {
517517 if !valid_pkg_name(n) {
518518 warn(~"malformed source json: "
@@ -529,7 +529,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
529529 }
530530 };
531531
532- let uuid = match p.find (&~"uuid") {
532+ let uuid = match p.find_copy (&~"uuid") {
533533 Some(json::String(n)) => {
534534 if !is_uuid(n) {
535535 warn(~"malformed source json: "
@@ -545,15 +545,15 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
545545 }
546546 };
547547
548- let url = match p.find (&~"url") {
548+ let url = match p.find_copy (&~"url") {
549549 Some(json::String(n)) => n,
550550 _ => {
551551 warn(~"malformed source json: " + src.name + ~" (missing url)");
552552 return;
553553 }
554554 };
555555
556- let method = match p.find (&~"method") {
556+ let method = match p.find_copy (&~"method") {
557557 Some(json::String(n)) => n,
558558 _ => {
559559 warn(~"malformed source json: "
@@ -562,13 +562,13 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
562562 }
563563 };
564564
565- let reference = match p.find (&~"ref") {
565+ let reference = match p.find_copy (&~"ref") {
566566 Some(json::String(n)) => Some(n),
567567 _ => None
568568 };
569569
570570 let mut tags = ~[];
571- match p.find (&~"tags") {
571+ match p.find_copy (&~"tags") {
572572 Some(json::List(js)) => {
573573 for js.each |j| {
574574 match *j {
@@ -580,7 +580,7 @@ fn load_one_source_package(src: @Source, p: &json::Object) {
580580 _ => ()
581581 }
582582
583- let description = match p.find (&~"description") {
583+ let description = match p.find_copy (&~"description") {
584584 Some(json::String(n)) => n,
585585 _ => {
586586 warn(~"malformed source json: " + src.name
@@ -1619,7 +1619,7 @@ fn dump_cache(c: &Cargo) {
16191619 need_dir(&c.root);
16201620
16211621 let out = c.root.push("cache.json");
1622- let _root = json::Object(~LinearMap());
1622+ let _root = json::Object(~LinearMap::new ());
16231623
16241624 if os::path_exists(&out) {
16251625 copy_warn(&out, &c.root.push("cache.json.old"));
@@ -1640,10 +1640,10 @@ fn dump_sources(c: &Cargo) {
16401640
16411641 match io::buffered_file_writer(&out) {
16421642 result::Ok(writer) => {
1643- let mut hash = ~LinearMap();
1643+ let mut hash = ~LinearMap::new ();
16441644
16451645 for c.sources.each |k, v| {
1646- let mut chash = ~LinearMap();
1646+ let mut chash = ~LinearMap::new ();
16471647
16481648 chash.insert(~"url", json::String(v.url));
16491649 chash.insert(~"method", json::String(v.method));
0 commit comments