aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMroik <mroik@delayed.space>2025-08-20 23:57:48 +0200
committerMroik <mroik@delayed.space>2025-08-21 00:11:42 +0200
commitc31238e32953d7c0e81261f75f52ae5eb7e12174 (patch)
tree4e876bef8a1f11c0677137b864ff99b12370e18b /src
parent322dc54246f875fe1050cd62164169bfdda8be96 (diff)
Update rust edition
Diffstat (limited to 'src')
-rw-r--r--src/app.rs14
-rw-r--r--src/event.rs2
-rw-r--r--src/main.rs4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/app.rs b/src/app.rs
index 65693c2..88d50e4 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1,28 +1,28 @@
use std::{
collections::HashSet,
error::Error,
- io::{stdout, Stdout, Write},
+ io::{Stdout, Write, stdout},
time::Duration,
};
use crossterm::{
+ ExecutableCommand, QueueableCommand,
cursor::{MoveDown, MoveTo, MoveToColumn, RestorePosition, SavePosition, SetCursorStyle},
style::{Color, Print, SetForegroundColor},
terminal::{
- disable_raw_mode, enable_raw_mode, size, Clear, ClearType, EnterAlternateScreen,
- LeaveAlternateScreen,
+ Clear, ClearType, EnterAlternateScreen, LeaveAlternateScreen, disable_raw_mode,
+ enable_raw_mode, size,
},
- ExecutableCommand, QueueableCommand,
};
use tokio::{
spawn,
- sync::mpsc::{channel, Receiver, Sender},
+ sync::mpsc::{Receiver, Sender, channel},
time::Instant,
};
use crate::{
error::{TerminalTooSmallError, TyperError, WordTooLongError},
- event::{handle_input, Event},
+ event::{Event, handle_input},
state::State,
};
@@ -49,7 +49,7 @@ pub struct App<'a> {
}
impl App<'_> {
- pub fn new(quote: &str) -> App {
+ pub fn new(quote: &str) -> App<'_> {
let (event_tx, event_rx): (Sender<Event>, Receiver<Event>) = channel(10);
App {
stdout: stdout(),
diff --git a/src/event.rs b/src/event.rs
index 2a16062..7e0db3e 100644
--- a/src/event.rs
+++ b/src/event.rs
@@ -1,6 +1,6 @@
use std::{error::Error, time::Duration};
-use crossterm::event::{poll, read, KeyCode, KeyModifiers};
+use crossterm::event::{KeyCode, KeyModifiers, poll, read};
use tokio::sync::mpsc::Sender;
use crate::app::TICK_RATE;
diff --git a/src/main.rs b/src/main.rs
index ad66a3e..f5c0722 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,13 +8,13 @@ pub mod state;
use std::{
error::Error,
fs::read_to_string,
- io::{stdin, IsTerminal, Read},
+ io::{IsTerminal, Read, stdin},
path::Path,
};
use app::App;
use clap::Parser;
-use rand::{thread_rng, Rng};
+use rand::{Rng, thread_rng};
#[derive(Parser)]
struct Args {
XMR address: 854DmXNrxULU3ZFJVs4Wc8PFhbq29RhqHhY8W6cdWrtFN3qmooKyyeYPcDzZTNRxphhJ5UzASQfAdEMwSteVqymk28aLhqj