Skip to content

Commit c8ecd16

Browse files
committed
Fix mac build (didn't change to P: AsRef<Path>)
1 parent ff52c99 commit c8ecd16

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

crates/cli/src/main.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ mod windows {
336336
}
337337

338338
impl Detect {
339-
pub fn detect(_path: Option<&Path>) -> anyhow::Result<impl InstalledApp> {
339+
pub fn detect<P: AsRef<Path>>(_path: Option<P>) -> anyhow::Result<impl InstalledApp> {
340340
Ok(App)
341341
}
342342
}
@@ -393,11 +393,14 @@ mod mac_os {
393393
}
394394

395395
impl Detect {
396-
pub fn detect(path: Option<&Path>) -> anyhow::Result<impl InstalledApp> {
396+
pub fn detect<P: AsRef<Path>>(path: Option<P>) -> anyhow::Result<impl InstalledApp> {
397397
let bundle_path = if let Some(bundle_path) = path {
398-
bundle_path
399-
.canonicalize()
400-
.with_context(|| format!("Args bundle path {bundle_path:?} canonicalization"))?
398+
bundle_path.as_ref().canonicalize().with_context(|| {
399+
format!(
400+
"Args bundle path {:?} canonicalization",
401+
bundle_path.as_ref()
402+
)
403+
})?
401404
} else {
402405
locate_bundle().context("bundle autodiscovery")?
403406
};

0 commit comments

Comments
 (0)