Skip to content

Commit

Permalink
Fix lint errors, except for the home_dir() issue (see volta-cli#207).
Browse files Browse the repository at this point in the history
  • Loading branch information
dherman committed Dec 1, 2018
1 parent 9307f84 commit e21ca68
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion crates/notion-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ pub mod toolchain;
pub mod version;

extern crate failure;
#[macro_use]
extern crate failure_derive;
#[macro_use]
extern crate notion_fail;
Expand Down
1 change: 0 additions & 1 deletion crates/test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub mod matchers;
pub mod process;

extern crate failure;
#[macro_use]
extern crate failure_derive;
#[macro_use]
extern crate notion_fail;
Expand Down
1 change: 0 additions & 1 deletion src/notion.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
extern crate console;
extern crate docopt;
extern crate failure;
#[macro_use]
extern crate failure_derive;
extern crate notion_core;
#[macro_use]
Expand Down
24 changes: 6 additions & 18 deletions tests/acceptance/support/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct CacheBuilder {
}

impl CacheBuilder {
#[allow(dead_code)]
pub fn new(path: PathBuf, expiry_path: PathBuf, contents: &str, expired: bool) -> CacheBuilder {
CacheBuilder {
path,
Expand Down Expand Up @@ -110,19 +111,6 @@ impl FileBuilder {
}
}

// because the http request methods from reqwest show up as <unknown> in mockito
cfg_if! {
if #[cfg(all(windows, target_arch = "x86_64"))] {
fn method_name(_method: &str) -> &str {
"<UNKNOWN>"
}
} else {
fn method_name(method: &str) -> &str {
method
}
}
}

#[must_use]
pub struct SandboxBuilder {
root: Sandbox,
Expand Down Expand Up @@ -212,6 +200,7 @@ impl SandboxBuilder {
}
}

#[allow(dead_code)]
/// Set the Node cache for the sandbox (chainable)
pub fn node_cache(mut self, cache: &str, expired: bool) -> Self {
self.caches.push(CacheBuilder::new(
Expand All @@ -238,11 +227,8 @@ impl SandboxBuilder {
}

/// Set the shell for the sandbox (chainable)
pub fn notion_shell(mut self, shell_name: &str) -> Self {
self.root
.env_vars
.push(EnvVar::new("NOTION_SHELL", shell_name));
self
pub fn notion_shell(self, shell_name: &str) -> Self {
self.env("NOTION_SHELL", shell_name)
}

/// Set an environment variable for the sandbox (chainable)
Expand Down Expand Up @@ -423,9 +409,11 @@ fn cache_dir() -> PathBuf {
fn node_cache_dir() -> PathBuf {
cache_dir().join("node")
}
#[allow(dead_code)]
fn node_index_file() -> PathBuf {
node_cache_dir().join("index.json")
}
#[allow(dead_code)]
fn node_index_expiry_file() -> PathBuf {
node_cache_dir().join("index.json.expires")
}
Expand Down

0 comments on commit e21ca68

Please sign in to comment.