This repository was archived by the owner on Mar 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +2
-4
lines changed Expand file tree Collapse file tree 3 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,14 @@ impl Key {
82
82
}
83
83
84
84
#[ doc( alias = "gdk_keyval_to_upper" ) ]
85
+ #[ must_use]
85
86
pub fn to_upper ( & self ) -> Self {
86
87
skip_assert_initialized ! ( ) ;
87
88
unsafe { ffi:: gdk_keyval_to_upper ( * * self ) } . into ( )
88
89
}
89
90
90
91
#[ doc( alias = "gdk_keyval_to_lower" ) ]
92
+ #[ must_use]
91
93
pub fn to_lower ( & self ) -> Self {
92
94
skip_assert_initialized ! ( ) ;
93
95
unsafe { ffi:: gdk_keyval_to_lower ( * * self ) } . into ( )
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ pub fn is_initialized_main_thread() -> bool {
55
55
}
56
56
57
57
/// Informs this crate that GDK has been initialized and the current thread is the main one.
58
- #[ allow( clippy:: if_then_panic) ]
59
58
pub unsafe fn set_initialized ( ) {
60
59
skip_assert_initialized ! ( ) ;
61
60
if is_initialized_main_thread ( ) {
Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ pub fn is_initialized_main_thread() -> bool {
72
72
/// 1. You have initialised the underlying GTK library yourself.
73
73
/// 2. You did 1 on the thread with which you are calling this function
74
74
/// 3. You ensure that this thread is the main thread for the process.
75
- #[ allow( clippy:: if_then_panic) ]
76
75
pub unsafe fn set_initialized ( ) {
77
76
skip_assert_initialized ! ( ) ;
78
77
if is_initialized_main_thread ( ) {
@@ -108,7 +107,6 @@ pub unsafe fn set_initialized() {
108
107
/// Instead, an Ok is returned if the windowing system was successfully
109
108
/// initialized otherwise an Err is returned.
110
109
#[ doc( alias = "gtk_init" ) ]
111
- #[ allow( clippy:: if_then_panic) ]
112
110
pub fn init ( ) -> Result < ( ) , glib:: BoolError > {
113
111
skip_assert_initialized ! ( ) ;
114
112
if is_initialized_main_thread ( ) {
@@ -139,7 +137,6 @@ pub fn init() -> Result<(), glib::BoolError> {
139
137
}
140
138
141
139
#[ doc( alias = "gtk_main_quit" ) ]
142
- #[ allow( clippy:: if_then_panic) ]
143
140
pub fn main_quit ( ) {
144
141
assert_initialized_main_thread ! ( ) ;
145
142
unsafe {
You can’t perform that action at this time.
0 commit comments