Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jan 8, 2024
1 parent dfb3645 commit a122ba7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/stdout-vs-stderr-all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ struct App {
impl App {
pub fn run(io_stream: IoStream) -> Result<bool> {
let mut terminal = init_terminal(io_stream.as_stream()?)?;
let mut app = Self::default();
app.current_stream = io_stream;
let mut app = App {
current_stream: io_stream,
..Default::default()
};

while !app.should_quit && !app.switch_stream {
app.tick();
Expand Down
2 changes: 0 additions & 2 deletions src/stdout-vs-stderr-profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ impl Widget for AppWidget<'_> {
#[derive(Debug, Default)]
struct App {
should_quit: bool,
current_stream: IoStream,
// a 2d vec of the colors to render, calculated when the size changes as this is expensive
// to calculate every frame
colors: Vec<Vec<Color>>,
Expand All @@ -106,7 +105,6 @@ impl App {
{
let mut terminal = init_terminal(stream)?;
let mut app = Self::default();
app.current_stream = io_stream;
let start_time = Instant::now();
while !app.should_quit {
app.tick();
Expand Down
6 changes: 4 additions & 2 deletions src/stdout-vs-stderr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ struct App {
impl App {
pub fn run(io_stream: IoStream) -> Result<bool> {
let mut terminal = init_terminal(io_stream.as_stream())?;
let mut app = Self::default();
app.current_stream = io_stream;
let mut app = App {
current_stream: io_stream,
..Default::default()
};

while !app.should_quit && !app.switch_stream {
app.tick();
Expand Down

0 comments on commit a122ba7

Please sign in to comment.