Merge pull request #765 from EverlastingBugstopper/avery/clippy

Fix clippy warnings and add to CI
master
ashley williams 5 years ago committed by GitHub
commit 4e51d6b9de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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 --version
- cargo fmt --all -- --check - cargo fmt --all -- --check
- rustup component add clippy-preview - rustup component add clippy-preview
# - cargo clippy --version - cargo clippy --version
# - cargo clippy - cargo clippy
- name: Book - name: Book
rust: stable rust: stable

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

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

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

Loading…
Cancel
Save