Skip to content

Commit 1145aa3

Browse files
committed
style: cargo fmt
Signed-off-by: Ross Williams <[email protected]>
1 parent 9ed7ef5 commit 1145aa3

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

src/bin/ssh-agent-mux/cli.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ impl Config {
8383

8484
config.config_path = args.config_path;
8585
config.listen_path = config.listen_path.expand_tilde_owned()?;
86-
config.log_file = config.log_file.map(|p| p.expand_tilde_owned()).transpose()?;
86+
config.log_file = config
87+
.log_file
88+
.map(|p| p.expand_tilde_owned())
89+
.transpose()?;
8790
config.agent_sock_paths = config
8891
.agent_sock_paths
8992
.into_iter()
@@ -102,7 +105,7 @@ pub enum LogLevel {
102105
Info = 3,
103106
Debug = 4,
104107
#[value(hide = true)]
105-
Trace = 5
108+
Trace = 5,
106109
}
107110

108111
impl From<LogLevel> for LevelFilter {

src/bin/ssh-agent-mux/logging.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use std::path::Path;
21
use std::env;
2+
use std::path::Path;
33

44
use flexi_logger::{
5-
filter::{LogLineFilter, LogLineWriter}, FileSpec, FlexiLoggerError, LogSpecification, Logger, LoggerHandle
5+
filter::{LogLineFilter, LogLineWriter},
6+
FileSpec, FlexiLoggerError, LogSpecification, Logger, LoggerHandle,
67
};
78
use log::LevelFilter;
89

@@ -39,7 +40,10 @@ impl LogLineFilter for SuppressExtensionFailure {
3940
}
4041
}
4142

42-
pub fn setup_logger(level: LevelFilter, log_file: Option<&Path>) -> Result<LoggerHandle, FlexiLoggerError> {
43+
pub fn setup_logger(
44+
level: LevelFilter,
45+
log_file: Option<&Path>,
46+
) -> Result<LoggerHandle, FlexiLoggerError> {
4347
// If RUST_LOG is in the environment, follow its directives;
4448
// otherwise, use the configuration file, command line args, or defaults.
4549
let logger = if env::var_os("RUST_LOG").is_some() {

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ impl MuxAgent {
205205
known_keys.insert(id.pubkey.clone(), sock_path.clone());
206206
}
207207
}
208-
log::trace!("Got {} identities from {}", agent_identities.len(), sock_path.display());
208+
log::trace!(
209+
"Got {} identities from {}",
210+
agent_identities.len(),
211+
sock_path.display()
212+
);
209213
identities.extend(agent_identities);
210214
}
211215

tests/harness/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn map_binary_notfound_error(binary_name: &str, err: io::Error) -> io::Error {
2828
if err.kind() == io::ErrorKind::NotFound {
2929
io::Error::new(
3030
err.kind(),
31-
format!("{binary_name} not found in PATH; OpenSSH client not installed?")
31+
format!("{binary_name} not found in PATH; OpenSSH client not installed?"),
3232
)
3333
} else {
3434
err

0 commit comments

Comments
 (0)