Skip to content

Commit

Permalink
imp: sort output
Browse files Browse the repository at this point in the history
  • Loading branch information
TimNN committed Jan 24, 2016
1 parent 7028210 commit b137e05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lockfile.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::HashMap;
use std::collections::{BTreeMap, HashMap};
use std::io::{self, Read, Write};
use std::env;
use std::error::Error;
Expand Down Expand Up @@ -108,7 +108,7 @@ impl Lockfile {
}

#[cfg_attr(feature = "lints", allow(str_to_string))]
pub fn get_updates(&mut self, cfg: &Config) -> CliResult<Option<HashMap<String, Dep>>> {
pub fn get_updates(&mut self, cfg: &Config) -> CliResult<Option<BTreeMap<String, Dep>>> {
try!(self.parse_deps_to_depth(cfg.depth));

// try!(self.get_non_root_deps(self.toml));
Expand Down Expand Up @@ -191,7 +191,7 @@ impl Lockfile {
debugln!("creating new lockfile from tmp results");
let mut updated_lf = try!(Lockfile::from_file(&tmp_lockfile));
try!(updated_lf.parse_deps_to_depth(0));
let mut res = HashMap::new();
let mut res = BTreeMap::new();
debugln!("parsing semver results");
for (d_name, d) in self.deps.iter() {
debugln!("iter; name={}; ver={}", d_name, d.ver);
Expand Down Expand Up @@ -289,7 +289,7 @@ impl Lockfile {
safe.push(dep);
}
}
let mut ret = HashMap::new();
let mut ret = BTreeMap::new();
for dep in safe.into_iter() {
// Needs .to_string() becuase to_owned() only gets a &str
ret.insert(dep.to_string(),
Expand Down

0 comments on commit b137e05

Please sign in to comment.