@sigit / siti / commits / 6f3e205

Fix clippy and rustfmt findings in src-tauri

- useless_borrows_in_formatting: drop redundant & on message in info! - doc_overindented_list_items: align TMPDIR doc continuation to 3 spaces - ptr_arg (x2): take &Path instead of &PathBuf in setup_hf_home/setup_tmpdir Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

paydii committed Jul 15, 2026 at 17:45 UTC 6f3e20535b87afed1adb7fe4514497056b2f4572
2 files changed +5 -5
src-tauri/src/chat/command_send_message.rs
+1 -1
@@ -60,7 +60,7 @@ pub async fn chat_send_message(app: AppHandle, message: String) -> Result<(), St
60 let history_len = ENGINE.history().await.len();
61 info!(
62 "Chat inference DISPATCH history_turns={} message=\"{}\"",
63 - history_len, &message
63 + history_len, message
64 );
65
66 tokio::task::spawn(async move {
src-tauri/src/setup/setup_application_filesystem.rs
+4 -4
@@ -7,7 +7,7 @@ use log::debug;
7 use objc2_foundation::ns_string;
8 #[cfg(any(target_os = "ios", target_os = "macos"))]
9 use objc2_foundation::NSFileManager;
10 -use std::path::PathBuf;
10 +use std::path::{Path, PathBuf};
11 use tauri::{App, Manager};
12
13 /// Application filesystem setup.
@@ -20,7 +20,7 @@ use tauri::{App, Manager};
20 /// 1. `HF_HOME` → controls where `hf-hub` stores downloaded models
21 /// 2. `HF_HUB_CACHE` → explicit cache dir read by some mistral.rs code paths
22 /// 3. `TMPDIR` → controls where `std::env::temp_dir()` points;
23 -/// mistral.rs writes Metal `.metallib` files there
23 +/// mistral.rs writes Metal `.metallib` files there
24 ///
25 /// The Apple App Group container (`group.com.ondeinference.apps`) is used as the
26 /// base directory so that models are shared across all apps in the group,
@@ -83,7 +83,7 @@ pub fn setup_application_filesystem(app: &App) -> Result<(), Box<dyn std::error:
83 ///
84 /// Using the App Group container means the model cache is shared across all
85 /// apps in the `group.com.ondeinference.apps` group, avoiding duplicate downloads.
86 -fn setup_hf_home(container_dir: &PathBuf) -> Result<(), Box<dyn std::error::Error>> {
86 +fn setup_hf_home(container_dir: &Path) -> Result<(), Box<dyn std::error::Error>> {
87 let models_home = container_dir.join("models");
88 let model_hub = models_home.join("hub");
89
@@ -128,7 +128,7 @@ fn setup_hf_home(container_dir: &PathBuf) -> Result<(), Box<dyn std::error::Erro
128 ///
129 /// On non-sandboxed macOS this is harmless; the system temp directory is
130 /// always writable, and if `TMPDIR` is already set we leave it alone.
131 -fn setup_tmpdir(container_dir: &PathBuf) -> Result<(), Box<dyn std::error::Error>> {
131 +fn setup_tmpdir(container_dir: &Path) -> Result<(), Box<dyn std::error::Error>> {
132 // Check whether the current temp_dir is actually writable.
133 let current_tmp = std::env::temp_dir();
134 let probe_file = current_tmp.join(".siti_tmp_probe");