]> uap-core.de Git - note.git/commitdiff
fix some warnings main
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Mon, 24 Aug 2026 19:18:28 +0000 (21:18 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Mon, 24 Aug 2026 19:18:28 +0000 (21:18 +0200)
application/backend/src/backend.rs
application/note/src/note.rs

index e6add72320b352366a52e636bc2202194a1c631a..aa03c9d44d09c943b1e5377c5714c2ab430fb12e 100644 (file)
@@ -31,7 +31,7 @@ use std::future::Future;
 use std::io::{Error, ErrorKind};
 use std::path::{Path, PathBuf};
 use std::pin::Pin;
-use sea_orm::{ActiveModelTrait, Database, DatabaseConnection, EntityTrait, QueryFilter, ColumnTrait, Set, QueryOrder, DbErr, ExprTrait, QuerySelect, NotSet};
+use sea_orm::{ActiveModelTrait, Database, DatabaseConnection, EntityTrait, QueryFilter, ColumnTrait, Set, QueryOrder, DbErr, ExprTrait, QuerySelect};
 use tokio::runtime::Runtime;
 use std::sync::{Arc};
 use std::thread::JoinHandle;
@@ -904,7 +904,6 @@ impl BackendHandle {
     where F: FnOnce(Result<(attachment::Model, attachmentcontent::Model), DbErr>) + Send + 'static {
         let backend = self.backend.clone();
         let pathbuf = path.to_path_buf();
-        let name = pathbuf.file_name();
         let Some(name) = pathbuf.file_name() else {
             callback(Err(DbErr::Custom("invalid path".to_string())));
             return;
index 719fe84348decd4a228919bad66265293b106ccb..3336fbcdf966365b39d51f65c729c01a6b34e3a7 100644 (file)
@@ -540,7 +540,7 @@ impl Note {
             if let EventType::FileList(file_selection) = event.event_type && let Some(file) = file_selection.get(0) {
                 let path = Path::new(file);
                 backend.add_note_attachment(note_id, path, move|result|{
-                    proxy.call_mainthread(|_doc, note|{
+                    proxy.call_mainthread(|_doc, _note|{
                         match result {
                             Ok((attachment, content)) => {
                                 println!("attachment: {} id: {}", attachment.attachment_id, content.attachment_id);