From 6a1aa8bbc669b26cd686647594d4f97f3ec064c7 Mon Sep 17 00:00:00 2001 From: Eugene Date: Thu, 21 Mar 2024 10:34:59 +0100 Subject: [PATCH] lint --- russh/examples/ratatui_app.rs | 22 +++++++++++----------- russh/examples/ratatui_shared_app.rs | 21 +++++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/russh/examples/ratatui_app.rs b/russh/examples/ratatui_app.rs index c4068d20..8f563656 100644 --- a/russh/examples/ratatui_app.rs +++ b/russh/examples/ratatui_app.rs @@ -1,15 +1,15 @@ -use async_trait::async_trait; -use ratatui::{ - backend::CrosstermBackend, - layout::Rect, - style::{Color, Style}, - widgets::{Block, Borders, Clear, Paragraph}, - Terminal, -}; -use russh::{server::*, Channel, ChannelId}; -use russh_keys::key::PublicKey; use std::collections::HashMap; use std::sync::Arc; + +use async_trait::async_trait; +use ratatui::backend::CrosstermBackend; +use ratatui::layout::Rect; +use ratatui::style::{Color, Style}; +use ratatui::widgets::{Block, Borders, Clear, Paragraph}; +use ratatui::Terminal; +use russh::server::*; +use russh::{Channel, ChannelId}; +use russh_keys::key::PublicKey; use tokio::sync::Mutex; type SshTerminal = Terminal>; @@ -41,7 +41,7 @@ impl std::io::Write for TerminalHandle { fn flush(&mut self) -> std::io::Result<()> { let handle = self.handle.clone(); - let channel_id = self.channel_id.clone(); + let channel_id = self.channel_id; let data = self.sink.clone().into(); futures::executor::block_on(async move { let result = handle.data(channel_id, data).await; diff --git a/russh/examples/ratatui_shared_app.rs b/russh/examples/ratatui_shared_app.rs index 73786d7e..81e96111 100644 --- a/russh/examples/ratatui_shared_app.rs +++ b/russh/examples/ratatui_shared_app.rs @@ -1,14 +1,15 @@ +use std::collections::HashMap; +use std::sync::Arc; + use async_trait::async_trait; -use ratatui::{ - backend::CrosstermBackend, - layout::Rect, - style::{Color, Style}, - widgets::{Block, Borders, Clear, Paragraph}, - Terminal, -}; -use russh::{server::*, Channel, ChannelId}; +use ratatui::backend::CrosstermBackend; +use ratatui::layout::Rect; +use ratatui::style::{Color, Style}; +use ratatui::widgets::{Block, Borders, Clear, Paragraph}; +use ratatui::Terminal; +use russh::server::*; +use russh::{Channel, ChannelId}; use russh_keys::key::PublicKey; -use std::{collections::HashMap, sync::Arc}; use tokio::sync::Mutex; type SshTerminal = Terminal>; @@ -40,7 +41,7 @@ impl std::io::Write for TerminalHandle { fn flush(&mut self) -> std::io::Result<()> { let handle = self.handle.clone(); - let channel_id = self.channel_id.clone(); + let channel_id = self.channel_id; let data = self.sink.clone().into(); futures::executor::block_on(async move { let result = handle.data(channel_id, data).await;