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:
parent
0317cc8cc5
commit
77e0b76408
296 changed files with 7147 additions and 4300 deletions
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue