From 08cc744a31cda8565d4383fd19b62fb06aa0f1f5 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 21 Sep 2023 17:12:51 -0500 Subject: [PATCH] some little bits of debug info --- src/rust/service_item_model.rs | 7 ++++--- src/rust/song_model.rs | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rust/service_item_model.rs b/src/rust/service_item_model.rs index ba941bb..4eaf66c 100644 --- a/src/rust/service_item_model.rs +++ b/src/rust/service_item_model.rs @@ -536,9 +536,10 @@ mod service_item_model { #[qinvokable] pub fn save(mut self: Pin<&mut Self>, file: QUrl) -> bool { println!("rust-save-file: {file}"); - let lfr = fs::File::create( - &file.to_local_file().unwrap_or_default().to_string(), - ); + let path = + file.to_local_file().unwrap_or_default().to_string(); + println!("path: {:?}", path); + let lfr = fs::File::create(&path); if let Ok(lf) = &lfr { println!("archive: {:?}", lf); let encoder = Encoder::new(lf, 3).unwrap(); diff --git a/src/rust/song_model.rs b/src/rust/song_model.rs index d079e39..741a1a4 100644 --- a/src/rust/song_model.rs +++ b/src/rust/song_model.rs @@ -6,7 +6,6 @@ mod song_model { use diesel::sqlite::SqliteConnection; use diesel::{delete, insert_into, prelude::*, update}; use std::collections::HashMap; - use std::path::{Path, PathBuf}; unsafe extern "C++" { include!(< QAbstractListModel >);