mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
Fix cargo clippy warnings
This commit is contained in:
@@ -3,7 +3,7 @@ name = "idevice-tools"
|
||||
description = "Rust binary tools to interact with services on iOS devices."
|
||||
authors = ["Jackson Coxson"]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
documentation = "https://docs.rs/idevice"
|
||||
repository = "https://github.com/jkcoxson/idevice"
|
||||
|
||||
@@ -38,14 +38,16 @@ pub async fn get_provider(
|
||||
}
|
||||
};
|
||||
Box::new(dev.to_provider(UsbmuxdAddr::from_env_var().unwrap(), label))
|
||||
} else if host.is_some() && pairing_file.is_some() {
|
||||
let host = match IpAddr::from_str(host.unwrap()) {
|
||||
} else if let Some(host) = host
|
||||
&& let Some(pairing_file) = pairing_file
|
||||
{
|
||||
let host = match IpAddr::from_str(host) {
|
||||
Ok(h) => h,
|
||||
Err(e) => {
|
||||
return Err(format!("Invalid host: {e:?}"));
|
||||
}
|
||||
};
|
||||
let pairing_file = match PairingFile::read_from_file(pairing_file.unwrap()) {
|
||||
let pairing_file = match PairingFile::read_from_file(pairing_file) {
|
||||
Ok(p) => p,
|
||||
Err(e) => {
|
||||
return Err(format!("Unable to read pairing file: {e:?}"));
|
||||
|
||||
Reference in New Issue
Block a user