Skip to content

Commit 0794d86

Browse files
committed
refactor(cli): Apply Clippy fixes
1 parent bef2bf7 commit 0794d86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl CONF {
3131
pub fn merge_env(&self) -> Result<()> {
3232
let mut config = self.write().expect(ERROR_CONFIG_WRITE);
3333
if let Some(lang) = env::var_os("LANG") {
34-
if lang.len() > 0 && env::var_os("CASILE_LANGUAGE").is_none() {
34+
if !lang.is_empty() && env::var_os("CASILE_LANGUAGE").is_none() {
3535
env::set_var("CASILE_LANGUAGE", lang)
3636
}
3737
}

src/ui_indicatif.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl IndicatifSubcommandStatus {
154154

155155
impl SubcommandStatus for IndicatifSubcommandStatus {
156156
fn end(&self, status: bool) {
157-
(status).then(|| self.pass()).unwrap_or_else(|| self.fail());
157+
if status { self.pass() } else { self.fail() };
158158
}
159159
fn error(&mut self, msg: String) {
160160
if CONF.get_bool("passthrough").unwrap() {

0 commit comments

Comments
 (0)