forked from InfoshockTech/xcrab
Fix clippy lints
This commit is contained in:
parent
2aac4731dd
commit
0832dacd1b
|
@ -31,10 +31,12 @@ pub fn load_file() -> XcrabConfig {
|
|||
let home_dir = std::env::var("HOME").expect("Error: $HOME variable was not set");
|
||||
|
||||
let contents = std::fs::read_to_string(format!("{}/.config/xcrab/config.toml", home_dir))
|
||||
.expect(&format!(
|
||||
.unwrap_or_else(|_| {
|
||||
panic!(
|
||||
"Error: file {}/.config/xcrab/config.toml was not found",
|
||||
home_dir
|
||||
));
|
||||
)
|
||||
});
|
||||
|
||||
let config: XcrabConfig = toml::from_str(&contents)
|
||||
.expect("Error: config file was not parseable. Is it properly formatted?");
|
||||
|
|
|
@ -42,7 +42,7 @@ pub async fn listener_task(socket_path: &Path, sender: UnboundedSender<String>)
|
|||
|
||||
stream.read_to_string(&mut buf).await?;
|
||||
|
||||
let _ = sender.send(buf);
|
||||
drop(sender.send(buf)); // go back to ms word clippy
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue