From efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 01:16:50 +0900 Subject: refactor: auto-fix clippy warnings --- crates/shirabe/src/repository/vcs/perforce_driver.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/repository/vcs/perforce_driver.rs') diff --git a/crates/shirabe/src/repository/vcs/perforce_driver.rs b/crates/shirabe/src/repository/vcs/perforce_driver.rs index 10cf913..3077cff 100644 --- a/crates/shirabe/src/repository/vcs/perforce_driver.rs +++ b/crates/shirabe/src/repository/vcs/perforce_driver.rs @@ -50,10 +50,9 @@ impl PerforceDriver { .repo_config .get("branch") .and_then(|v| v.as_string()) + && !branch.is_empty() { - if !branch.is_empty() { - self.branch = branch.to_string(); - } + self.branch = branch.to_string(); } let repo_config = self.inner.repo_config.clone(); @@ -171,7 +170,7 @@ impl PerforceDriver { .as_mut() .unwrap() .get_composer_information(&path) - .map_or(false, |info| info.map_or(false, |i| !i.is_empty())) + .is_ok_and(|info| info.is_some_and(|i| !i.is_empty())) } pub fn get_contents(&self, _url: &str) -> anyhow::Result { -- cgit v1.3.1