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 {
|
match channel {
|
||||||
// TODO: "REGISTER" =>
|
"REGISTER" => {} // TODO
|
||||||
// TODO: "UNREGISTER" =>
|
"UNREGISTER" => {} // TODO
|
||||||
"FML|HS" => {
|
"FML|HS" => {
|
||||||
let msg = crate::protocol::Serializable::read_from(&mut std::io::Cursor::new(data))
|
let msg = crate::protocol::Serializable::read_from(&mut std::io::Cursor::new(data))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
|
@ -1539,9 +1539,8 @@ impl UIElement for TextBox {
|
||||||
(VirtualKeyCode::V, true) => {
|
(VirtualKeyCode::V, true) => {
|
||||||
if ctrl_pressed {
|
if ctrl_pressed {
|
||||||
let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap();
|
let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap();
|
||||||
match clipboard.get_contents() {
|
if let Ok(text) = clipboard.get_contents() {
|
||||||
Ok(text) => self.input.push_str(&text),
|
self.input.push_str(&text)
|
||||||
Err(_) => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue