mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 20:09:59 +03:00
Add rustfmt.toml for explicit styling (#348)
* Propose an explicit .rustfnt.toml Use 2024 style, 4 spaces for tabs and epand the default width a tad * Auto-format the existing code with new rules
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::{ConnectionError, FrontendEvent, FrontendRequest, IpcError};
|
||||
use std::{
|
||||
cmp::min,
|
||||
io::{self, prelude::*, BufReader, LineWriter, Lines},
|
||||
io::{self, BufReader, LineWriter, Lines, prelude::*},
|
||||
thread,
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::{ConnectionError, FrontendEvent, FrontendRequest, IpcError};
|
||||
use std::{
|
||||
cmp::min,
|
||||
task::{ready, Poll},
|
||||
task::{Poll, ready},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ mod connect;
|
||||
mod connect_async;
|
||||
mod listen;
|
||||
|
||||
pub use connect::{connect, FrontendEventReader, FrontendRequestWriter};
|
||||
pub use connect_async::{connect_async, AsyncFrontendEventReader, AsyncFrontendRequestWriter};
|
||||
pub use connect::{FrontendEventReader, FrontendRequestWriter, connect};
|
||||
pub use connect_async::{AsyncFrontendEventReader, AsyncFrontendRequestWriter, connect_async};
|
||||
pub use listen::AsyncFrontendListener;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use futures::{stream::SelectAll, Stream, StreamExt};
|
||||
use futures::{Stream, StreamExt, stream::SelectAll};
|
||||
#[cfg(unix)]
|
||||
use std::path::PathBuf;
|
||||
use std::{
|
||||
@@ -63,7 +63,7 @@ impl AsyncFrontendListener {
|
||||
Ok(ls) => ls,
|
||||
// some other lan-mouse instance has bound the socket in the meantime
|
||||
Err(e) if e.kind() == ErrorKind::AddrInUse => {
|
||||
return Err(IpcListenerCreationError::AlreadyRunning)
|
||||
return Err(IpcListenerCreationError::AlreadyRunning);
|
||||
}
|
||||
Err(e) => return Err(IpcListenerCreationError::Bind(e)),
|
||||
};
|
||||
@@ -75,7 +75,7 @@ impl AsyncFrontendListener {
|
||||
Ok(ls) => ls,
|
||||
// some other lan-mouse instance has bound the socket in the meantime
|
||||
Err(e) if e.kind() == ErrorKind::AddrInUse => {
|
||||
return Err(IpcListenerCreationError::AlreadyRunning)
|
||||
return Err(IpcListenerCreationError::AlreadyRunning);
|
||||
}
|
||||
Err(e) => return Err(IpcListenerCreationError::Bind(e)),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user