From f89b53189736558eb308d12aa2ea421d015eab0d Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 20 Jun 2022 01:25:23 +0300 Subject: [PATCH] Bump smithay-client-toolkit version to v0.16.0 --- CHANGELOG.md | 2 ++ Cargo.toml | 4 ++-- examples/clipboard.rs | 11 +++++------ src/mime.rs | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a19e116..49a02d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Update SCTK to 0.16 + ## 0.6.5 -- 2021-10-31 - Update SCTK to 0.15, updating wayland-rs to `0.29` diff --git a/Cargo.toml b/Cargo.toml index bc746c6..9606563 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,11 +10,11 @@ license = "MIT" keywords = ["clipboard", "wayland"] [dependencies] -sctk = { package = "smithay-client-toolkit", version = "0.15", default-features = false } +sctk = { package = "smithay-client-toolkit", version = "0.16", default-features = false } wayland-client = { version = "0.29", features = ["use_system_lib"] } [dev-dependencies] -sctk = { package = "smithay-client-toolkit", version = "0.15", default-features = false, features = ["calloop"] } +sctk = { package = "smithay-client-toolkit", version = "0.16", default-features = false, features = ["calloop"] } [features] default = ["dlopen"] diff --git a/examples/clipboard.rs b/examples/clipboard.rs index 47e708f..aa2b75c 100644 --- a/examples/clipboard.rs +++ b/examples/clipboard.rs @@ -101,8 +101,8 @@ fn main() { // Insert repeat rate handling source match keyboard_mapping_result { - Ok((keyboard, repeat_source)) => { - seats.push((seat.detach(), Some((keyboard, repeat_source)))); + Ok(keyboard) => { + seats.push((seat.detach(), Some(keyboard))); } Err(err) => { eprintln!("Failed to map keyboard on seat {:?} : {:?}", seat_data.name, err); @@ -143,19 +143,18 @@ fn main() { // Insert repeat rate source match keyboard_mapping_result { - Ok((keyboard, repeat_source)) => { - *mapped_keyboard = Some((keyboard, repeat_source)); + Ok(keyboard) => { + *mapped_keyboard = Some(keyboard); } Err(err) => { eprintln!("Failed to map keyboard on seat {} : {:?}", seat_data.name, err); } } } - } else if let Some((keyboard, repeat_source)) = mapped_keyboard.take() { + } else if let Some(keyboard) = mapped_keyboard.take() { if keyboard.as_ref().version() >= 3 { keyboard.release(); } - event_loop_handle.remove(repeat_source); } }); diff --git a/src/mime.rs b/src/mime.rs index 63d6115..f786ab6 100644 --- a/src/mime.rs +++ b/src/mime.rs @@ -45,5 +45,5 @@ impl ToString for MimeType { /// RFC-2046, however the platform line terminator and what applications /// expect is LF. pub fn normalize_to_lf(text: String) -> String { - text.replace("\r\n", "\n").replace("\r", "\n") + text.replace("\r\n", "\n").replace('\r', "\n") }