Skip to content

Commit bd2d51e

Browse files
committed
Clippy updates
These are minor lint improvements suggested by current clippy.
1 parent d65e9de commit bd2d51e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/cli/download_tracker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl DownloadTracker {
155155
fn display(&mut self) {
156156
match self.start_sec {
157157
// Maybe forgot to call `prepare_for_new_download` first
158-
None => return,
158+
None => {}
159159
Some(start_sec) => {
160160
// Panic if someone pops the default bytes unit...
161161
let unit = *self.units.last().unwrap();

src/cli/setup_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub fn main() -> Result<()> {
106106

107107
let opts = InstallOpts {
108108
default_host_triple: default_host,
109-
default_toolchain: default_toolchain.to_owned(),
109+
default_toolchain,
110110
profile: profile.to_owned(),
111111
no_modify_path,
112112
components: &components,

src/dist/dist.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ impl FromStr for PartialToolchainDesc {
332332
type Err = Error;
333333
fn from_str(name: &str) -> Result<Self> {
334334
let parsed: ParsedToolchainDesc = name.parse()?;
335-
let target =
336-
PartialTargetTriple::new(parsed.target.as_ref().map(|c| c.as_str()).unwrap_or(""));
335+
let target = PartialTargetTriple::new(parsed.target.as_deref().unwrap_or(""));
337336

338337
target
339338
.map(|target| Self {

0 commit comments

Comments
 (0)