mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
refactor: various changes based on rust 1.65 clippy
This commit is contained in:
parent
c48029664d
commit
ff17ec1996
7 changed files with 59 additions and 64 deletions
|
@ -141,10 +141,9 @@ async fn try_get_mpd_conn(host: &str) -> Result<Connection, MpdProtocolError> {
|
|||
fn is_unix_socket(host: &str) -> bool {
|
||||
let path = PathBuf::from(host);
|
||||
path.exists()
|
||||
&& match path.metadata() {
|
||||
Ok(metadata) => metadata.file_type().is_socket(),
|
||||
Err(_) => false,
|
||||
}
|
||||
&& path
|
||||
.metadata()
|
||||
.map_or(false, |metadata| metadata.file_type().is_socket())
|
||||
}
|
||||
|
||||
async fn connect_unix(host: &str) -> Result<Connection, MpdProtocolError> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue