Skip to content

Commit e8e8f5e

Browse files
committed
refactor: Delete unnecessary name assignment
1 parent 3ba135b commit e8e8f5e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/rustup-mock/src/clitools.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn setup(s: Scenario, f: &Fn(&mut Config)) {
9898
distdir: distdir.path().to_owned(),
9999
rustupdir: rustupdir.path().to_owned(),
100100
customdir: customdir.path().to_owned(),
101-
cargodir: cargodir,
101+
cargodir,
102102
homedir: homedir.path().to_owned(),
103103
emptydir: emptydir.path().to_owned(),
104104
workdir: RefCell::new(workdir.path().to_owned()),
@@ -559,12 +559,12 @@ fn build_mock_channel(
559559
available: true,
560560
components: vec![],
561561
extensions: vec![],
562-
installer: installer,
562+
installer,
563563
});
564564

565565
MockPackage {
566-
name: name,
567-
version: version,
566+
name,
567+
version,
568568
targets: target_pkgs.collect(),
569569
}
570570
});
@@ -629,7 +629,7 @@ fn build_mock_channel(
629629
MockChannel {
630630
name: channel.to_string(),
631631
date: date.to_string(),
632-
packages: packages,
632+
packages,
633633
renames,
634634
}
635635
}

src/rustup-mock/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ impl MockFile {
105105

106106
fn _new(path: String, contents: Arc<Vec<u8>>) -> MockFile {
107107
MockFile {
108-
path: path,
108+
path,
109109
contents: Contents::File(MockContents {
110-
contents: contents,
110+
contents,
111111
executable: false,
112112
}),
113113
}

0 commit comments

Comments
 (0)