chore: Run rustfmt

master
Jesper Håkansson 7 years ago
parent b7a84200a6
commit 9404c1496d
  1. 6
      src/lockfile.rs
  2. 5
      src/manifest/mod.rs
  3. 2
      src/readme.rs
  4. 6
      src/test/webdriver.rs

@ -69,14 +69,16 @@ fn get_lockfile_path(crate_path: &Path) -> Result<PathBuf, failure::Error> {
let crate_root = cargo_metadata::metadata(Some(&manifest))
.map_err(|_| Error::CrateConfig {
message: String::from("Error while processing crate metadata"),
})?.workspace_root;
})?
.workspace_root;
// Check that a lock file can be found in the directory. Return an error
// if it cannot, otherwise return the path buffer.
let lockfile_path = Path::new(&crate_root).join("Cargo.lock");
if !lockfile_path.is_file() {
Err(Error::CrateConfig {
message: format!("Could not find lockfile at {:?}", lockfile_path),
}.into())
}
.into())
} else {
Ok(lockfile_path)
}

@ -11,8 +11,8 @@ use self::npm::{
repository::Repository, CommonJSPackage, ESModulesPackage, NoModulesPackage, NpmPackage,
};
use emoji;
use failure;
use error::Error;
use failure;
use progressbar::Step;
use serde_json;
use toml;
@ -82,7 +82,8 @@ fn read_cargo_toml(path: &Path) -> Result<CargoManifest, failure::Error> {
return Err(Error::crate_config(&format!(
"Crate directory is missing a `Cargo.toml` file; is `{}` the wrong directory?",
path.display()
)).into());
))
.into());
}
let mut cargo_file = File::open(manifest_path)?;
let mut cargo_contents = String::new();

@ -1,7 +1,7 @@
//! Generating `README` files for the packaged wasm.
use std::fs;
use failure;
use std::fs;
use std::path::Path;
use emoji;

@ -25,7 +25,8 @@ pub fn get_or_install_chromedriver(
"No crate-local `chromedriver` binary found, and could not find a global \
`chromedriver` on the `$PATH`. Not installing `chromedriver` because of noinstall \
mode.",
).into()),
)
.into()),
}
}
@ -75,7 +76,8 @@ pub fn get_or_install_geckodriver(
(BuildMode::Noinstall, None) => Err(Error::crate_config(
"No crate-local `geckodriver` binary found, and could not find a global `geckodriver` \
on the `$PATH`. Not installing `geckodriver` because of noinstall mode.",
).into()),
)
.into()),
}
}

Loading…
Cancel
Save