1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-30 19:58:30 +00:00

apply new rustfmt.toml changes, fix some clippy lints

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-12-15 00:05:47 -05:00
parent 0317cc8cc5
commit 77e0b76408
No known key found for this signature in database
296 changed files with 7147 additions and 4300 deletions

View file

@ -94,15 +94,16 @@ impl Console {
debug!("session starting");
while self.server.running() {
match self.readline().await {
Ok(event) => match event {
ReadlineEvent::Line(string) => self.clone().handle(string).await,
ReadlineEvent::Interrupted => continue,
ReadlineEvent::Eof => break,
ReadlineEvent::Quit => self.server.shutdown().unwrap_or_else(error::default_log),
| Ok(event) => match event {
| ReadlineEvent::Line(string) => self.clone().handle(string).await,
| ReadlineEvent::Interrupted => continue,
| ReadlineEvent::Eof => break,
| ReadlineEvent::Quit =>
self.server.shutdown().unwrap_or_else(error::default_log),
},
Err(error) => match error {
ReadlineError::Closed => break,
ReadlineError::IO(error) => {
| Err(error) => match error {
| ReadlineError::Closed => break,
| ReadlineError::IO(error) => {
error!("console I/O: {error:?}");
break;
},
@ -158,9 +159,9 @@ impl Console {
async fn process(self: Arc<Self>, line: String) {
match self.admin.command_in_place(line, None).await {
Ok(Some(ref content)) => self.output(content),
Err(ref content) => self.output_err(content),
_ => unreachable!(),
| Ok(Some(ref content)) => self.output(content),
| Err(ref content) => self.output_err(content),
| _ => unreachable!(),
}
}