From 427c0ae433a6fbd75a88729d0ac837d710a38c51 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Fri, 10 Jan 2025 22:35:33 +0100 Subject: [PATCH] Move option to call site --- src/app/searchprovider.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/searchprovider.rs b/src/app/searchprovider.rs index 28593c0..4603700 100644 --- a/src/app/searchprovider.rs +++ b/src/app/searchprovider.rs @@ -121,7 +121,7 @@ async fn activate_result( } } -fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Option { +fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Variant { let metas: Vec = call .identifiers .iter() @@ -139,7 +139,7 @@ fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Option>(); - Some((metas,).into()) + (metas,).into() } async fn dispatch_method_call( @@ -161,7 +161,7 @@ async fn dispatch_method_call( // We just search fresh again, since our model is neither that big nor that complicated Ok(Some(get_result_set(&app, c.terms.as_slice()))) } - GetResultMetas(c) => Ok(get_result_metas(&app, &c)), + GetResultMetas(c) => Ok(Some(get_result_metas(&app, &c))), ActivateResult(c) => activate_result(&app, c).await, LaunchSearch(c) => { glib::debug!("Launching search for terms {:?}", &c.terms);