From 20231f0900c2fd07e40faafcd5cdbe4aff9f1375 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 4 Aug 2026 18:26:37 +0800 Subject: fix: cargo warnings --- qml_plugin/src/launcher/duckduckgo.rs | 4 +--- qml_plugin/src/launcher/mathcalc.rs | 4 ++-- qml_plugin/src/launcher/smartcalc.rs | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'qml_plugin/src/launcher') diff --git a/qml_plugin/src/launcher/duckduckgo.rs b/qml_plugin/src/launcher/duckduckgo.rs index bb0f806..1de7161 100644 --- a/qml_plugin/src/launcher/duckduckgo.rs +++ b/qml_plugin/src/launcher/duckduckgo.rs @@ -60,10 +60,8 @@ pub struct DuckDuckGoRs { } impl qobject::DuckDuckGo { - fn query(mut self: Pin<&mut Self>, input: QString) { + fn query(self: Pin<&mut Self>, input: QString) { let qt_thread = self.qt_thread(); - // self.as_mut() - // .reset(); self.rust_mut() .executor .spawn( diff --git a/qml_plugin/src/launcher/mathcalc.rs b/qml_plugin/src/launcher/mathcalc.rs index 8c24a92..5b67d2f 100644 --- a/qml_plugin/src/launcher/mathcalc.rs +++ b/qml_plugin/src/launcher/mathcalc.rs @@ -1,6 +1,6 @@ use cxx_qt::{CxxQtType, Threading}; use cxx_qt_lib::{QString, QVariant}; -use kalk::{calculation_result::CalculationResult, parser}; +use kalk::parser; use std::{pin::Pin, sync::Arc}; use tokio::sync::Mutex; use unwrap_print::PrintableResult; @@ -102,7 +102,7 @@ impl qobject::MathCalc { ) }, ); - qt_thread + _ = qt_thread .queue( |mut qo| { qo.as_mut() diff --git a/qml_plugin/src/launcher/smartcalc.rs b/qml_plugin/src/launcher/smartcalc.rs index 98cb037..c23ecfa 100644 --- a/qml_plugin/src/launcher/smartcalc.rs +++ b/qml_plugin/src/launcher/smartcalc.rs @@ -3,7 +3,7 @@ use cxx_qt_lib::{QString, QVariant}; use std::pin::Pin; use unwrap_print::PrintableResult; -use crate::{ExclusiveExecutor, RUNTIME}; +use crate::ExclusiveExecutor; #[cxx_qt::bridge] mod qobject { @@ -102,7 +102,7 @@ impl qobject::SmartCalc { None, ) .await; - qt_thread + _ = qt_thread .queue( |mut qo| { qo.as_mut() -- cgit v1.2.3