refactor: cargo fmt
This commit is contained in:
@@ -146,12 +146,12 @@ impl DockerData {
|
|||||||
output
|
output
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|i| {
|
.filter_map(|i| {
|
||||||
i.id.as_ref().map(|id| (
|
i.id.as_ref().map(|id| {
|
||||||
|
(
|
||||||
i.state.as_ref().unwrap_or(&String::new()) == "running",
|
i.state.as_ref().unwrap_or(&String::new()) == "running",
|
||||||
id.to_owned(),
|
id.to_owned(),
|
||||||
))
|
)
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,16 +99,14 @@ impl InputHandler {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let gui_state = Arc::clone(&self.gui_state);
|
|
||||||
|
|
||||||
// If the info box sleep handle is currently being executed, as in m is pressed twice within a 4000ms window
|
// If the info box sleep handle is currently being executed, as in m is pressed twice within a 4000ms window
|
||||||
// then cancel the first handle, as a new handle will be invoked
|
// then cancel the first handle, as a new handle will be invoked
|
||||||
if let Some(info_sleep_timer) = self.info_sleep.as_ref() {
|
if let Some(info_sleep_timer) = self.info_sleep.as_ref() {
|
||||||
info_sleep_timer.abort();
|
info_sleep_timer.abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some(self.info_sleep).as_ref().unwrap().ab
|
let gui_state = Arc::clone(&self.gui_state);
|
||||||
|
// Show the info box - with "mouse capture enabled / disabled", for 4000 ms
|
||||||
self.info_sleep = Some(tokio::spawn(async move {
|
self.info_sleep = Some(tokio::spawn(async move {
|
||||||
tokio::time::sleep(std::time::Duration::from_millis(4000)).await;
|
tokio::time::sleep(std::time::Duration::from_millis(4000)).await;
|
||||||
gui_state.lock().reset_info_box()
|
gui_state.lock().reset_info_box()
|
||||||
|
|||||||
@@ -460,7 +460,8 @@ pub fn draw_help_box<B: Backend>(f: &mut Frame<'_, B>) {
|
|||||||
let description_text = format!("\n{}", DESCRIPTION);
|
let description_text = format!("\n{}", DESCRIPTION);
|
||||||
|
|
||||||
let mut help_text = String::from("\n ( tab ) or ( alt+tab ) to change panels");
|
let mut help_text = String::from("\n ( tab ) or ( alt+tab ) to change panels");
|
||||||
help_text.push_str("\n ( ↑ ↓ ) or ( j k ) or (PgUp PgDown) or (Home End) to change selected line");
|
help_text
|
||||||
|
.push_str("\n ( ↑ ↓ ) or ( j k ) or (PgUp PgDown) or (Home End) to change selected line");
|
||||||
help_text.push_str("\n ( enter ) to send docker container commands");
|
help_text.push_str("\n ( enter ) to send docker container commands");
|
||||||
help_text.push_str("\n ( h ) to toggle this help information");
|
help_text.push_str("\n ( h ) to toggle this help information");
|
||||||
help_text.push_str(
|
help_text.push_str(
|
||||||
|
|||||||
Reference in New Issue
Block a user