diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-23 09:31:24 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-23 09:31:51 +0300 |
| commit | b27140950935da810c4c58fd763a99781923c1bb (patch) | |
| tree | 8b4c6864be726b875970bd441c26256efe96e73e /src | |
| parent | 500dcca9b70c9b8968f3dbcfe06c4177ca7fd66a (diff) | |
| download | niri-b27140950935da810c4c58fd763a99781923c1bb.tar.gz niri-b27140950935da810c4c58fd763a99781923c1bb.tar.bz2 niri-b27140950935da810c4c58fd763a99781923c1bb.zip | |
dbus/gnome_shell_screenshot: Fix pick_color return type
Diffstat (limited to 'src')
| -rw-r--r-- | src/dbus/gnome_shell_screenshot.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
