Clean feature-less build warnings

This commit is contained in:
Jackson Coxson
2025-05-09 14:29:51 -06:00
parent baa9ffcc29
commit 650cf5f017
3 changed files with 8 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ impl Idevice {
///
/// # Errors
/// Returns `IdeviceError` if transmission fails
async fn send_raw(&mut self, message: &[u8]) -> Result<(), IdeviceError> {
pub async fn send_raw(&mut self, message: &[u8]) -> Result<(), IdeviceError> {
self.send_raw_with_progress(message, |_| async {}, ()).await
}
@@ -197,7 +197,7 @@ impl Idevice {
///
/// # Errors
/// Returns `IdeviceError` if transmission fails
async fn send_raw_with_progress<Fut, S>(
pub async fn send_raw_with_progress<Fut, S>(
&mut self,
message: &[u8],
callback: impl Fn(((usize, usize), S)) -> Fut,
@@ -233,7 +233,7 @@ impl Idevice {
///
/// # Errors
/// Returns `IdeviceError` if reading fails or connection is closed prematurely
async fn read_raw(&mut self, len: usize) -> Result<Vec<u8>, IdeviceError> {
pub async fn read_raw(&mut self, len: usize) -> Result<Vec<u8>, IdeviceError> {
if let Some(socket) = &mut self.socket {
let mut buf = vec![0; len];
socket.read_exact(&mut buf).await?;
@@ -253,7 +253,7 @@ impl Idevice {
///
/// # Errors
/// Returns `IdeviceError` if reading fails
async fn read_any(&mut self, max_size: u32) -> Result<Vec<u8>, IdeviceError> {
pub async fn read_any(&mut self, max_size: u32) -> Result<Vec<u8>, IdeviceError> {
if let Some(socket) = &mut self.socket {
let mut buf = vec![0; max_size as usize];
let len = socket.read(&mut buf).await?;

View File

@@ -3,11 +3,7 @@
//! Provides abstractions for establishing connections to iOS devices through different
//! transport mechanisms (TCP, USB, etc.).
use std::{
future::Future,
net::{IpAddr, SocketAddr},
pin::Pin,
};
use std::{future::Future, pin::Pin};
#[cfg(feature = "tcp")]
use tokio::net::TcpStream;
@@ -51,7 +47,7 @@ pub trait IdeviceProvider: Unpin + Send + Sync + std::fmt::Debug {
#[derive(Debug)]
pub struct TcpProvider {
/// IP address of the device
pub addr: IpAddr,
pub addr: std::net::IpAddr,
/// Pairing file for secure communication
pub pairing_file: PairingFile,
/// Label identifying this connection
@@ -74,7 +70,7 @@ impl IdeviceProvider for TcpProvider {
let addr = self.addr;
let label = self.label.clone();
Box::pin(async move {
let socket_addr = SocketAddr::new(addr, port);
let socket_addr = std::net::SocketAddr::new(addr, port);
let stream = TcpStream::connect(socket_addr).await?;
Ok(Idevice::new(Box::new(stream), label))
})
@@ -153,4 +149,3 @@ impl IdeviceProvider for UsbmuxdProvider {
})
}
}

View File

@@ -2,6 +2,7 @@
//!
//! Provides helper functions for working with Apple's Property List (PLIST) format,
//! including serialization and pretty-printing utilities.
#![allow(dead_code)] // functions might not be used by all features
use plist::Value;
@@ -125,4 +126,3 @@ fn print_plist(p: &Value, indentation: usize) -> String {
_ => "Unknown".to_string(),
}
}