mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 20:20:55 +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:
@@ -10,8 +10,8 @@ use input_capture::{
|
||||
};
|
||||
use input_event::scancode;
|
||||
use lan_mouse_proto::ProtoEvent;
|
||||
use local_channel::mpsc::{channel, Receiver, Sender};
|
||||
use tokio::task::{spawn_local, JoinHandle};
|
||||
use local_channel::mpsc::{Receiver, Sender, channel};
|
||||
use tokio::task::{JoinHandle, spawn_local};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use crate::connect::LanMouseConnection;
|
||||
|
||||
@@ -13,7 +13,7 @@ use thiserror::Error;
|
||||
use toml;
|
||||
|
||||
use lan_mouse_cli::CliArgs;
|
||||
use lan_mouse_ipc::{Position, DEFAULT_PORT};
|
||||
use lan_mouse_ipc::{DEFAULT_PORT, Position};
|
||||
|
||||
use input_event::scancode::{
|
||||
self,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::client::ClientManager;
|
||||
use lan_mouse_ipc::{ClientHandle, DEFAULT_PORT};
|
||||
use lan_mouse_proto::{ProtoEvent, MAX_EVENT_SIZE};
|
||||
use local_channel::mpsc::{channel, Receiver, Sender};
|
||||
use lan_mouse_proto::{MAX_EVENT_SIZE, ProtoEvent};
|
||||
use local_channel::mpsc::{Receiver, Sender, channel};
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
collections::{HashMap, HashSet},
|
||||
@@ -15,7 +15,7 @@ use thiserror::Error;
|
||||
use tokio::{
|
||||
net::UdpSocket,
|
||||
sync::Mutex,
|
||||
task::{spawn_local, JoinSet},
|
||||
task::{JoinSet, spawn_local},
|
||||
};
|
||||
use webrtc_dtls::{
|
||||
config::{Config, ExtendedMasterSecretType},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::{collections::HashMap, net::IpAddr};
|
||||
|
||||
use local_channel::mpsc::{channel, Receiver, Sender};
|
||||
use tokio::task::{spawn_local, JoinHandle};
|
||||
use local_channel::mpsc::{Receiver, Sender, channel};
|
||||
use tokio::task::{JoinHandle, spawn_local};
|
||||
|
||||
use hickory_resolver::{ResolveError, TokioResolver};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
@@ -3,7 +3,7 @@ use futures::StreamExt;
|
||||
use input_emulation::{EmulationHandle, InputEmulation, InputEmulationError};
|
||||
use input_event::Event;
|
||||
use lan_mouse_proto::{Position, ProtoEvent};
|
||||
use local_channel::mpsc::{channel, Receiver, Sender};
|
||||
use local_channel::mpsc::{Receiver, Sender, channel};
|
||||
use std::{
|
||||
cell::Cell,
|
||||
collections::HashMap,
|
||||
@@ -13,7 +13,7 @@ use std::{
|
||||
};
|
||||
use tokio::{
|
||||
select,
|
||||
task::{spawn_local, JoinHandle},
|
||||
task::{JoinHandle, spawn_local},
|
||||
};
|
||||
|
||||
/// emulation handling events received from a listener
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use futures::{Stream, StreamExt};
|
||||
use lan_mouse_proto::{ProtoEvent, MAX_EVENT_SIZE};
|
||||
use local_channel::mpsc::{channel, Receiver, Sender};
|
||||
use lan_mouse_proto::{MAX_EVENT_SIZE, ProtoEvent};
|
||||
use local_channel::mpsc::{Receiver, Sender, channel};
|
||||
use rustls::pki_types::CertificateDer;
|
||||
use std::{
|
||||
collections::{HashMap, VecDeque},
|
||||
@@ -12,7 +12,7 @@ use std::{
|
||||
use thiserror::Error;
|
||||
use tokio::{
|
||||
sync::Mutex as AsyncMutex,
|
||||
task::{spawn_local, JoinHandle},
|
||||
task::{JoinHandle, spawn_local},
|
||||
};
|
||||
use webrtc_dtls::{
|
||||
config::{ClientAuthType::RequireAnyClientCert, Config, ExtendedMasterSecretType},
|
||||
@@ -20,7 +20,7 @@ use webrtc_dtls::{
|
||||
crypto::Certificate,
|
||||
listener::listen,
|
||||
};
|
||||
use webrtc_util::{conn::Listener, Conn, Error};
|
||||
use webrtc_util::{Conn, Error, conn::Listener};
|
||||
|
||||
use crate::crypto;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user