From dac967ce27d4eeb496dcd98ba91641fbe29df957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 7 Jun 2019 13:21:17 +0200 Subject: [PATCH] run rustfmt --- src/bin/cargo/commands/vendor.rs | 8 ++++++-- src/cargo/lib.rs | 1 - src/cargo/util/sha256.rs | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/bin/cargo/commands/vendor.rs b/src/bin/cargo/commands/vendor.rs index 5bcff121832..da0e5838562 100644 --- a/src/bin/cargo/commands/vendor.rs +++ b/src/bin/cargo/commands/vendor.rs @@ -93,13 +93,17 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { None }; if let Some(flag) = crates_io_cargo_vendor_flag { - return Err(failure::format_err!("\ + return Err(failure::format_err!( + "\ the crates.io `cargo vendor` command has now been merged into Cargo itself and does not support the flag `{}` currently; to continue using the flag you can execute `cargo-vendor vendor ...`, and if you would like to see this flag supported in Cargo itself please feel free to file an issue at https://github.com/rust-lang/cargo/issues/new -", flag).into()); +", + flag + ) + .into()); } let ws = args.workspace(config)?; diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index cba2749f8dd..64e1ea2eae5 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -160,7 +160,6 @@ fn handle_cause(cargo_err: &Error, shell: &mut Shell) -> bool { // The first error has already been printed to the shell. for err in cargo_err.iter_causes() { - // If we're not in verbose mode then print remaining errors until one // marked as `Internal` appears. if verbose != Verbose && err.downcast_ref::().is_some() { diff --git a/src/cargo/util/sha256.rs b/src/cargo/util/sha256.rs index a8f762c15e0..b2cd8cab08a 100644 --- a/src/cargo/util/sha256.rs +++ b/src/cargo/util/sha256.rs @@ -1,9 +1,9 @@ use self::crypto_hash::{Algorithm, Hasher}; -use std::fs::File; +use crate::util::{CargoResult, CargoResultExt}; use crypto_hash; -use std::io::{self, Write, Read}; +use std::fs::File; +use std::io::{self, Read, Write}; use std::path::Path; -use crate::util::{CargoResult, CargoResultExt}; pub struct Sha256(Hasher);