Clean up cargo clippy warnings

This commit is contained in:
Jackson Coxson
2025-09-16 14:05:03 -06:00
parent da17fa01dc
commit 34fb39f12d
3 changed files with 12 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ installation_proxy = [
"dep:futures",
"async_zip/tokio",
"async_zip/deflate",
"tokio/fs"
"tokio/fs",
]
springboardservices = []
misagent = []
@@ -135,6 +135,7 @@ full = [
"preboard_service",
"restore_service",
"rsd",
"screenshotr",
"springboardservices",
"syslog_relay",
"tcp",

View File

@@ -7,7 +7,6 @@ use idevice::{
};
mod common;
mod pcap;
#[tokio::main]
async fn main() {

View File

@@ -64,8 +64,8 @@ async fn main() {
return;
}
};
let mut res: Vec<u8> = Vec::new();
if let Ok(proxy) = CoreDeviceProxy::connect(&*provider).await {
let res = if let Ok(proxy) = CoreDeviceProxy::connect(&*provider).await {
let rsd_port = proxy.handshake.server_rsd_port;
let adapter = proxy.create_software_tunnel().expect("no software tunnel");
@@ -85,10 +85,10 @@ async fn main() {
let mut ts_client = idevice::dvt::screenshot::ScreenshotClient::new(&mut ts_client)
.await
.expect("Unable to get channel for take screenshot");
res = ts_client
ts_client
.take_screenshot()
.await
.expect("Failed to take screenshot");
.expect("Failed to take screenshot")
} else {
let mut screenshot_client = match ScreenshotService::connect(&*provider).await {
Ok(client) => client,
@@ -99,9 +99,10 @@ async fn main() {
return;
}
};
res = screenshot_client.take_screenshot().await.unwrap();
}
match fs::write(output_path, &res) {
screenshot_client.take_screenshot().await.unwrap()
};
match fs::write(output_path, res) {
Ok(_) => println!("Screenshot saved to: {}", output_path),
Err(e) => eprintln!("Failed to write screenshot to file: {}", e),
}