From 702e7ddd6759abecd4ecdc35d2a5088660520fea Mon Sep 17 00:00:00 2001 From: Billy Messenger <60663878+BillyDM@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:31:13 -0500 Subject: [PATCH] remove commented code, improve attribution --- src/x11/drag_n_drop.rs | 4 +++- src/x11/xcb_connection/get_property.rs | 16 +++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/x11/drag_n_drop.rs b/src/x11/drag_n_drop.rs index aab94d5..0d856a2 100644 --- a/src/x11/drag_n_drop.rs +++ b/src/x11/drag_n_drop.rs @@ -1,4 +1,6 @@ -// Code copied and modifed from https://github.com/rust-windowing/winit/blob/master/src/platform_impl/linux/x11/dnd.rs +// The following code was copied and modified from: +// https://github.com/rust-windowing/winit/blob/44aabdddcc9f720aec860c1f83c1041082c28560/src/platform_impl/linux/x11/dnd.rs +// winit license (Apache License 2.0): https://github.com/rust-windowing/winit/blob/44aabdddcc9f720aec860c1f83c1041082c28560/LICENSE use std::{ io, diff --git a/src/x11/xcb_connection/get_property.rs b/src/x11/xcb_connection/get_property.rs index 5ce4253..67f263e 100644 --- a/src/x11/xcb_connection/get_property.rs +++ b/src/x11/xcb_connection/get_property.rs @@ -1,4 +1,6 @@ -// Code copied and modifed from https://github.com/rust-windowing/winit/blob/master/src/platform_impl/linux/x11/util/window_property.rs +// The following code was copied and modified from: +// https://github.com/rust-windowing/winit/blob/44aabdddcc9f720aec860c1f83c1041082c28560/src/platform_impl/linux/x11/util/window_property.rs +// winit license (Apache License 2.0): https://github.com/rust-windowing/winit/blob/44aabdddcc9f720aec860c1f83c1041082c28560/LICENSE use std::error::Error; use std::ffi::c_int; @@ -19,18 +21,6 @@ pub enum GetPropertyError { FormatMismatch(c_int), } -/* -impl GetPropertyError { - pub fn is_actual_property_type(&self, t: xproto::Atom) -> bool { - if let GetPropertyError::TypeMismatch(actual_type) = *self { - actual_type == t - } else { - false - } - } -} -*/ - impl> From for GetPropertyError { fn from(e: T) -> Self { Self::X11rbError(Arc::new(e.into()))