mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 14:22:37 +03:00
clippy
This commit is contained in:
parent
70579b45b7
commit
f95cdfad0e
@ -76,5 +76,5 @@ impl Client {
|
||||
rpc!(key_down, SendKeyDown, UnitResponse);
|
||||
rpc!(mouse_event, SendMouseEvent, UnitResponse);
|
||||
rpc!(resize, Resize, UnitResponse);
|
||||
rpc!(is_tab_dead, IsTabDead, IsTabDeadResponse);
|
||||
rpc!(check_tab_dead, IsTabDead, IsTabDeadResponse);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ pub struct ClientSession {
|
||||
|
||||
struct BufferedTerminalHost<'a> {
|
||||
write: std::cell::RefMut<'a, dyn std::io::Write>,
|
||||
clipboard: Option<Option<String>>,
|
||||
clipboard: Option<String>,
|
||||
title: Option<String>,
|
||||
}
|
||||
|
||||
@ -68,7 +68,9 @@ impl<'a> term::TerminalHost for BufferedTerminalHost<'a> {
|
||||
}
|
||||
|
||||
fn set_clipboard(&mut self, clip: Option<String>) -> Result<(), Error> {
|
||||
self.clipboard.replace(clip);
|
||||
if let Some(clip) = clip {
|
||||
self.clipboard.replace(clip);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ impl Tab for ClientTab {
|
||||
client.key_down(SendKeyDown {
|
||||
tab_id: self.remote_tab_id,
|
||||
event: KeyEvent {
|
||||
key: key,
|
||||
key,
|
||||
modifiers: mods,
|
||||
},
|
||||
})?;
|
||||
@ -119,7 +119,7 @@ impl Tab for ClientTab {
|
||||
fn is_dead(&self) -> bool {
|
||||
let mut client = self.client.client.lock().unwrap();
|
||||
let is_dead = client
|
||||
.is_tab_dead(IsTabDead {
|
||||
.check_tab_dead(IsTabDead {
|
||||
tab_id: self.remote_tab_id,
|
||||
})
|
||||
.map(|r| r.is_dead)
|
||||
@ -158,7 +158,7 @@ impl Renderable for RenderableState {
|
||||
fn get_cursor_position(&self) -> CursorPosition {
|
||||
let coarse = self.coarse.borrow();
|
||||
if let Some(coarse) = coarse.as_ref() {
|
||||
coarse.cursor_position.clone()
|
||||
coarse.cursor_position
|
||||
} else {
|
||||
CursorPosition::default()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user