From b27140950935da810c4c58fd763a99781923c1bb Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 23 Mar 2025 09:31:24 +0300 Subject: dbus/gnome_shell_screenshot: Fix pick_color return type --- src/dbus/gnome_shell_screenshot.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dbus/gnome_shell_screenshot.rs b/src/dbus/gnome_shell_screenshot.rs index dd762498..d837b8b3 100644 --- a/src/dbus/gnome_shell_screenshot.rs +++ b/src/dbus/gnome_shell_screenshot.rs @@ -3,8 +3,8 @@ use std::path::PathBuf; use niri_ipc::PickedColor; use zbus::fdo::{self, RequestNameFlags}; -use zbus::interface; use zbus::zvariant::OwnedValue; +use zbus::{interface, zvariant}; use super::Start; @@ -71,10 +71,10 @@ impl Screenshot { }; let mut result = HashMap::new(); - let rgb_slice: &[f64] = &color.rgb; + let [r, g, b] = color.rgb; result.insert( "color".to_string(), - zbus::zvariant::Value::from(rgb_slice).try_into().unwrap(), + zvariant::OwnedValue::try_from(zvariant::Value::from((r, g, b))).unwrap(), ); Ok(result) -- cgit