Fix build on macOS

This commit is contained in:
Exidex 2024-11-10 17:36:53 +01:00
parent 26695673a9
commit d3cc26cfd3
No known key found for this signature in database
GPG key ID: 46D8D21671EB48FA

View file

@ -100,13 +100,13 @@ pub fn macos_major_version() -> u8 {
#[cfg(target_os = "macos")]
#[op]
pub async fn macos_app_from_path(path: String) -> Result<Option<DesktopPathAction>> {
pub async fn macos_app_from_path(path: String) -> anyhow::Result<Option<DesktopPathAction>> {
Ok(spawn_blocking(|| macos::macos_app_from_path(&PathBuf::from(path))).await?)
}
#[cfg(target_os = "macos")]
#[op]
pub async fn macos_app_from_arbitrary_path(path: String) -> Result<Option<DesktopPathAction>> {
pub async fn macos_app_from_arbitrary_path(path: String) -> anyhow::Result<Option<DesktopPathAction>> {
Ok(spawn_blocking(|| macos::macos_app_from_arbitrary_path(PathBuf::from(path))).await?)
}