From a8f115666344abe3b606a4a65595ca301e7ac08a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 24 Jun 2026 21:10:48 +0900 Subject: refactor(process): take cwd as Option<&str> instead of IntoExecCwd Replace the generic cwd parameter backed by the IntoExecCwd trait with a concrete Option<&str> across execute/execute_args/execute_tty/execute_async. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/hg.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/src/util/hg.rs') diff --git a/crates/shirabe/src/util/hg.rs b/crates/shirabe/src/util/hg.rs index 7fbf125..0caf3ab 100644 --- a/crates/shirabe/src/util/hg.rs +++ b/crates/shirabe/src/util/hg.rs @@ -50,7 +50,7 @@ impl Hg { if self .process .borrow_mut() - .execute_args(&command, &mut ignored_output, cwd.clone()) + .execute_args(&command, &mut ignored_output, cwd.as_deref()) == 0 { return Ok(()); @@ -109,7 +109,7 @@ impl Hg { if self .process .borrow_mut() - .execute_args(&command, &mut ignored_output, cwd) + .execute_args(&command, &mut ignored_output, cwd.as_deref()) == 0 { return Ok(()); @@ -150,7 +150,7 @@ impl Hg { if process.borrow_mut().execute_args( &["hg".to_string(), "--version".to_string()], &mut output, - (), + None, ) == 0 && let Some(matches) = Preg::is_match_with_indexed_captures( r"/^.+? (\d+(?:\.\d+)+)(?:\+.*?)?\)?\r?\n/", -- cgit v1.3.1