Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit ba947c7

Browse files
committed
bump Cargo to 0.37
1 parent a66a418 commit ba947c7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/sfackler/cargo-tree"
99
readme = "README.md"
1010

1111
[dependencies]
12-
cargo = "0.36"
12+
cargo = "0.37"
1313
env_logger = "0.6"
1414
failure = "0.1"
1515
petgraph = "0.4"

src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::collections::hash_map::Entry;
1616
use std::collections::{HashMap, HashSet};
1717
use std::path::PathBuf;
1818
use std::str::{self, FromStr};
19+
use std::rc::Rc;
1920
use structopt::clap::AppSettings;
2021
use structopt::StructOpt;
2122

@@ -108,6 +109,9 @@ struct Args {
108109
#[structopt(long = "locked")]
109110
/// Require Cargo.lock is up to date
110111
locked: bool,
112+
#[structopt(long = "offline")]
113+
/// Do not access the network
114+
offline: bool,
111115
#[structopt(short = "Z", value_name = "FLAG")]
112116
/// Unstable (nightly-only) flags to Cargo
113117
unstable_flags: Vec<String>,
@@ -184,6 +188,7 @@ fn real_main(args: Args, config: &mut Config) -> CliResult {
184188
&args.color,
185189
args.frozen,
186190
args.locked,
191+
args.offline,
187192
&args.target_dir,
188193
&args.unstable_flags,
189194
)?;
@@ -322,7 +327,7 @@ fn resolve<'a, 'cfg>(
322327

323328
let method = Method::Required {
324329
dev_deps: !no_dev_dependencies,
325-
features: &features,
330+
features: Rc::new(features),
326331
all_features,
327332
uses_default_features: !no_default_features,
328333
};
@@ -335,7 +340,6 @@ fn resolve<'a, 'cfg>(
335340
None,
336341
&[],
337342
true,
338-
true,
339343
)?;
340344
Ok((packages, resolve))
341345
}

0 commit comments

Comments
 (0)