Skip to content

Commit 963d40b

Browse files
authored
make clippy happy again (#87)
make clippy happy again
1 parent e5f8256 commit 963d40b

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ fmt +ARGS="": spellcheck
5555

5656
# Spellcheck the codebase
5757
spellcheck +ARGS="--write-changes":
58-
@codespell --builtin clear,rare,informal,code -I .codespellignore --skip target* "*.svg" data{{ARGS}}
58+
@codespell --builtin clear,rare,informal,code -I .codespellignore --skip target,data,build,po {{ARGS}}
5959
@echo Spellings look good!

src/package_manager.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ impl Component for PackageManagerModel {
339339
commands.push("sudo groupadd -f nix-users");
340340
commands.push("sudo usermod -a -G nix-users $USER");
341341
commands.push("{ sudo systemctl enable nix-daemon.service || :; }");
342-
commands.push("sudo su $USER -c 'nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs'");
342+
commands.push(
343+
"sudo su $USER -c 'nix-channel --add https://nixos.org/channels/nixpkgs-unstable \
344+
nixpkgs'",
345+
);
343346
commands.push("sudo su $USER -c 'nix-channel --update'");
344347
}
345348

src/progress.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::fmt::Write;
12
use std::io::{BufRead, BufReader};
23
use std::process::{Command, Stdio};
34

@@ -146,7 +147,8 @@ impl SimpleComponent for ProgressModel {
146147

147148
// Aggregate all the commands.
148149
for command in commands.clone() {
149-
commands_with_results += &format!(
150+
_ = write!(
151+
&mut commands_with_results,
150152
"{command} && {{ echo ---successful---; }} || {{ echo ---failed---; }}; "
151153
);
152154
}
@@ -207,15 +209,15 @@ impl SimpleComponent for ProgressModel {
207209
}
208210
}
209211

210-
if !error_occured {
212+
if processor.wait().is_ok() && !error_occured {
211213
sender.output(Self::Output::InstallationComplete).unwrap();
212214
tracing::info!("Installation complete");
213215
Command::new("pkexec")
214216
.args(["sh", "-c", "sudo apt remove -yq rhino-setup"])
215217
.status()
216218
.unwrap();
217219
}
218-
});
220+
})
219221
},
220222
};
221223
}

0 commit comments

Comments
 (0)