Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit 5684af1

Browse files
authored
Merge pull request #704 from GuillaumeGomez/clippy
Fix new clippy lints
2 parents 23070fb + 9d688c5 commit 5684af1

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

gdk/src/keys.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ impl Key {
8282
}
8383

8484
#[doc(alias = "gdk_keyval_to_upper")]
85+
#[must_use]
8586
pub fn to_upper(&self) -> Self {
8687
skip_assert_initialized!();
8788
unsafe { ffi::gdk_keyval_to_upper(**self) }.into()
8889
}
8990

9091
#[doc(alias = "gdk_keyval_to_lower")]
92+
#[must_use]
9193
pub fn to_lower(&self) -> Self {
9294
skip_assert_initialized!();
9395
unsafe { ffi::gdk_keyval_to_lower(**self) }.into()

gdk/src/rt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pub fn is_initialized_main_thread() -> bool {
5555
}
5656

5757
/// Informs this crate that GDK has been initialized and the current thread is the main one.
58-
#[allow(clippy::if_then_panic)]
5958
pub unsafe fn set_initialized() {
6059
skip_assert_initialized!();
6160
if is_initialized_main_thread() {

gtk/src/rt.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ pub fn is_initialized_main_thread() -> bool {
7272
/// 1. You have initialised the underlying GTK library yourself.
7373
/// 2. You did 1 on the thread with which you are calling this function
7474
/// 3. You ensure that this thread is the main thread for the process.
75-
#[allow(clippy::if_then_panic)]
7675
pub unsafe fn set_initialized() {
7776
skip_assert_initialized!();
7877
if is_initialized_main_thread() {
@@ -108,7 +107,6 @@ pub unsafe fn set_initialized() {
108107
/// Instead, an Ok is returned if the windowing system was successfully
109108
/// initialized otherwise an Err is returned.
110109
#[doc(alias = "gtk_init")]
111-
#[allow(clippy::if_then_panic)]
112110
pub fn init() -> Result<(), glib::BoolError> {
113111
skip_assert_initialized!();
114112
if is_initialized_main_thread() {
@@ -139,7 +137,6 @@ pub fn init() -> Result<(), glib::BoolError> {
139137
}
140138

141139
#[doc(alias = "gtk_main_quit")]
142-
#[allow(clippy::if_then_panic)]
143140
pub fn main_quit() {
144141
assert_initialized_main_thread!();
145142
unsafe {

0 commit comments

Comments
 (0)