Fix unnecessary use of match with if let (single_match)
This commit is contained in:
parent
deb35db895
commit
113abefd80
|
@ -844,8 +844,8 @@ impl Server {
|
|||
}
|
||||
|
||||
match channel {
|
||||
// TODO: "REGISTER" =>
|
||||
// TODO: "UNREGISTER" =>
|
||||
"REGISTER" => {} // TODO
|
||||
"UNREGISTER" => {} // TODO
|
||||
"FML|HS" => {
|
||||
let msg = crate::protocol::Serializable::read_from(&mut std::io::Cursor::new(data))
|
||||
.unwrap();
|
||||
|
|
|
@ -1539,9 +1539,8 @@ impl UIElement for TextBox {
|
|||
(VirtualKeyCode::V, true) => {
|
||||
if ctrl_pressed {
|
||||
let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap();
|
||||
match clipboard.get_contents() {
|
||||
Ok(text) => self.input.push_str(&text),
|
||||
Err(_) => (),
|
||||
if let Ok(text) = clipboard.get_contents() {
|
||||
self.input.push_str(&text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue