diff --git a/flake.lock b/flake.lock index 7d187393..28bbb1e0 100644 --- a/flake.lock +++ b/flake.lock @@ -385,11 +385,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1727106047, - "narHash": "sha256-54LQDxmV9RJAem4rut0TgAywe1u8dahK79md0y9DqUA=", + "lastModified": 1727175561, + "narHash": "sha256-eRTto85IVBo4dMLr91Y40Qf71YFc3V0kPimvSxvXFEw=", "owner": "holochain", "repo": "holonix", - "rev": "687934d2f5bdcfe11c1dde438d21315a43aed3c8", + "rev": "5505e4f9569fabd73f26a5c7cc02ae94a73f6bce", "type": "github" }, "original": { diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index a4a5c01a..34c97c32 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -4,9 +4,9 @@ use std::path::PathBuf; use tauri_plugin_holochain::{HolochainPluginConfig, HolochainExt, WANNetworkConfig}; use tauri::AppHandle; -const APP_ID: &'static str = "mewsfeed"; -const SIGNAL_URL: &'static str = "wss://sbd.holo.host"; -const BOOTSTRAP_URL: &'static str = "https://bootstrap-0.infra.holochain.org"; +const APP_ID: &str = "mewsfeed"; +const SIGNAL_URL: &str = "wss://sbd.holo.host"; +const BOOTSTRAP_URL: &str = "https://bootstrap-0.infra.holochain.org"; pub fn happ_bundle() -> AppBundle { let bytes = include_bytes!("../../workdir/mewsfeed.happ"); @@ -59,9 +59,8 @@ async fn setup(handle: AppHandle) -> anyhow::Result<()> { let installed_apps = admin_ws .list_apps(None) .await - .map_err(|err| tauri_plugin_holochain::Error::ConductorApiError(err))?; - - if installed_apps.iter().find(|app| app.installed_app_id.as_str().eq(APP_ID)).is_none() { + .map_err(tauri_plugin_holochain::Error::ConductorApiError)?; + if !installed_apps.iter().any(|app| app.installed_app_id.as_str().eq(APP_ID)) { handle .holochain()? .install_app( @@ -119,8 +118,7 @@ fn holochain_dir() -> PathBuf { // Convert `tmp_dir` into a `Path`, destroying the `TempDir` // without deleting the directory. - let tmp_path = tmp_dir.into_path(); - tmp_path + tmp_dir.into_path() } } else { app_dirs2::app_root(