Fix clippy warnings and add to CI

master
Avery Harnish 5 years ago
parent 029127d39c
commit d1dc19f880
  1. 4
      .travis.yml
  2. 2
      src/command/utils.rs
  3. 2
      src/manifest/mod.rs
  4. 2
      src/npm.rs

@ -52,8 +52,8 @@ matrix:
- cargo fmt --version
- cargo fmt --all -- --check
- rustup component add clippy-preview
# - cargo clippy --version
# - cargo clippy
- cargo clippy --version
- cargo clippy
- name: Book
rust: stable

@ -30,7 +30,7 @@ fn find_manifest_from_cwd() -> Result<PathBuf, failure::Error> {
return Ok(PathBuf::from("."));
}
} else {
return Ok(parent_path.to_owned());
return Ok(parent_path);
}
}
}

@ -590,7 +590,7 @@ impl CrateData {
files.push(js_file.clone());
if include_commonjs_shim {
let js_bg_file = format!("{}_bg.js", name_prefix);
files.push(js_bg_file.to_string());
files.push(js_bg_file);
}
let pkg = &self.data.packages[self.current_idx];

@ -28,7 +28,7 @@ pub fn npm_publish(
None => cmd.current_dir(path).arg("publish"),
};
if let Some(tag) = tag {
cmd.arg("--tag").arg(&tag.to_string());
cmd.arg("--tag").arg(tag);
};
child::run(cmd, "npm publish").context("Publishing to npm failed")?;

Loading…
Cancel
Save