Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(remote): clippy 1.99 result_large_err on the remote guards and the gallery hash

purplec66695308b0c
diff --git a/src-tauri/src/commands/remote_chats.rs b/src-tauri/src/commands/remote_chats.rs
index d2be488f..317a1b7e 100644
--- a/src-tauri/src/commands/remote_chats.rs
+++ b/src-tauri/src/commands/remote_chats.rs
@@ -824,6 +824,7 @@ pub(crate) struct Device {
caller: SealedCaller,
}
+#[allow(clippy::result_large_err)]
async fn guard(ctx: &ChatsCtx, parts: (Option<axum::Extension<SealedCaller>>, Option<axum::Extension<CallerDevice>>)) -> Result<Device, Response> {
let (sealed, device) = parts;
let Some(axum::Extension(caller)) = sealed else {
diff --git a/src-tauri/src/commands/remote_create.rs b/src-tauri/src/commands/remote_create.rs
index 5bd5668d..bb008e64 100644
--- a/src-tauri/src/commands/remote_create.rs
+++ b/src-tauri/src/commands/remote_create.rs
@@ -2733,6 +2733,7 @@ impl<S: Send + Sync> axum::extract::FromRequestParts<S> for Caller {
/// The device's own right (sealed channel), then the global switch, then the
/// caller. All behind `auth_middleware`, which checks the device right for
/// these paths already; this is the second lock on the same door.
+#[allow(clippy::result_large_err)]
async fn guard(ctx: &CreateCtx, caller: &Caller) -> Result<String, Response> {
if let Some(sealed) = &caller.sealed {
if !sealed.rights.create {
@@ -2996,6 +2997,7 @@ pub(crate) async fn handle_gallery(AxumState(ctx): AxumState<CreateCtx>, caller:
}
/// The entry's hash, made once and then remembered.
+#[allow(clippy::result_large_err)]
async fn gallery_hash(ctx: &CreateCtx, entry: &GalleryEntry) -> Result<String, Response> {
if !entry.file.sha256.is_empty() {
return Ok(entry.file.sha256.clone());