feat: rebase from main branch

This commit is contained in:
Corentin LIAUD
2025-12-23 20:48:09 +01:00
parent c49378182e
commit ed242808aa
4 changed files with 21 additions and 29 deletions

View File

@@ -1,9 +1,8 @@
use std::{fs::File, io::Write};
use adb_client::{ADBListItemType, ADBServerDevice};
use anyhow::{Result, anyhow};
use crate::models::{ADBCliResult, LocalDeviceCommand};
use crate::ADBCliResult;
use crate::models::LocalDeviceCommand;
use adb_client::ADBServerDevice;
pub fn handle_local_commands(
mut device: ADBServerDevice,

View File

@@ -69,6 +69,7 @@ impl From<adb_client::RustADBError> for ADBCliError {
| RustADBError::UpgradeError(_)
| RustADBError::MDNSError(_)
| RustADBError::SendError(_)
| RustADBError::UnknownFileMode(_)
| RustADBError::UnknownTransport(_) => Self::MayNeedAnIssue(value),
// List of [`RustADBError`] that may occur in standard contexts and therefore do not require for issues
RustADBError::ADBDeviceNotPaired

View File

@@ -7,23 +7,13 @@ use super::RebootTypeCommand;
#[derive(Parser, Debug)]
pub enum DeviceCommands {
/// Spawn an interactive shell or run a list of commands on the device
Shell {
commands: Vec<String>,
},
Shell { commands: Vec<String> },
/// Pull a file from device
Pull {
source: String,
destination: String,
},
Pull { source: String, destination: String },
/// Push a file on device
Push {
filename: String,
path: String,
},
Push { filename: String, path: String },
/// Stat a file on device
Stat {
path: String,
},
Stat { path: String },
/// Run an activity on device specified by the intent
Run {
/// The package whose activity is to be invoked
@@ -53,7 +43,9 @@ pub enum DeviceCommands {
/// Framebuffer image destination path
path: String,
},
/// List files on device
List {
/// Path to list files from
path: String,
},
}