Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Mar 21, 2024
1 parent 62366e9 commit 6a1aa8b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
22 changes: 11 additions & 11 deletions russh/examples/ratatui_app.rs
Original file line number Diff line number Diff line change
@@ -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<CrosstermBackend<TerminalHandle>>;
Expand Down Expand Up @@ -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;
Expand Down
21 changes: 11 additions & 10 deletions russh/examples/ratatui_shared_app.rs
Original file line number Diff line number Diff line change
@@ -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<CrosstermBackend<TerminalHandle>>;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6a1aa8b

Please sign in to comment.