Skip to content

Commit

Permalink
Clippy updates
Browse files Browse the repository at this point in the history
These are minor lint improvements suggested by current clippy.
  • Loading branch information
rbtcollins committed Feb 26, 2020
1 parent d65e9de commit bd2d51e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cli/download_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl DownloadTracker {
fn display(&mut self) {
match self.start_sec {
// Maybe forgot to call `prepare_for_new_download` first
None => return,
None => {}
Some(start_sec) => {
// Panic if someone pops the default bytes unit...
let unit = *self.units.last().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/cli/setup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn main() -> Result<()> {

let opts = InstallOpts {
default_host_triple: default_host,
default_toolchain: default_toolchain.to_owned(),
default_toolchain,
profile: profile.to_owned(),
no_modify_path,
components: &components,
Expand Down
3 changes: 1 addition & 2 deletions src/dist/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ impl FromStr for PartialToolchainDesc {
type Err = Error;
fn from_str(name: &str) -> Result<Self> {
let parsed: ParsedToolchainDesc = name.parse()?;
let target =
PartialTargetTriple::new(parsed.target.as_ref().map(|c| c.as_str()).unwrap_or(""));
let target = PartialTargetTriple::new(parsed.target.as_deref().unwrap_or(""));

target
.map(|target| Self {
Expand Down

0 comments on commit bd2d51e

Please sign in to comment.