Skip to content

Commit bbc38db

Browse files
chore: enable try_err clippy lint (#1004)
1 parent 49a0a9e commit bbc38db

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ range_plus_one = "warn"
142142
# TODO: self_named_module_files = "warn"
143143
# TODO: partial_pub_fields = "warn" (should we enable only in pdu crates?)
144144
redundant_type_annotations = "warn"
145+
try_err = "warn"
145146
rest_pat_in_fully_bound_structs = "warn"
146147

147148
# == Compile-time / optimization == #

crates/ironrdp-cliprdr-native/src/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl WinClipboard {
162162
// SAFETY: low-level WinAPI call
163163
let atom = unsafe { RegisterClassA(&wc) };
164164
if atom == 0 {
165-
return Err(Error::from_win32())?;
165+
return Err(WinCliprdrError::from(Error::from_win32()));
166166
}
167167

168168
// SAFETY: low-level WinAPI call
@@ -184,7 +184,7 @@ impl WinClipboard {
184184
};
185185

186186
if window.is_invalid() {
187-
return Err(Error::from_win32())?;
187+
return Err(WinCliprdrError::from(Error::from_win32()));
188188
}
189189
// Init clipboard processing for WinAPI event loop
190190
//

0 commit comments

Comments
 (0)