mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-06-14 11:42:02 +08:00
fix: 补齐 ATX 控制器缺失接口并完成全项目 clippy -D warnings 修复
This commit is contained in:
@@ -328,8 +328,7 @@ impl VentoyDrive {
|
||||
let image = match VentoyImage::open(&path) {
|
||||
Ok(img) => img,
|
||||
Err(e) => {
|
||||
let _ = rt.block_on(tx.send(Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
let _ = rt.block_on(tx.send(Err(std::io::Error::other(
|
||||
e.to_string(),
|
||||
))));
|
||||
return;
|
||||
@@ -341,8 +340,7 @@ impl VentoyDrive {
|
||||
|
||||
// Stream the file through the writer
|
||||
if let Err(e) = image.read_file_to_writer(&file_path_owned, &mut chunk_writer) {
|
||||
let _ = rt.block_on(tx.send(Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
let _ = rt.block_on(tx.send(Err(std::io::Error::other(
|
||||
e.to_string(),
|
||||
))));
|
||||
}
|
||||
@@ -543,12 +541,11 @@ mod tests {
|
||||
/// Decompress xz file using system command
|
||||
fn decompress_xz(src: &std::path::Path, dst: &std::path::Path) -> std::io::Result<()> {
|
||||
let output = Command::new("xz")
|
||||
.args(&["-d", "-k", "-c", src.to_str().unwrap()])
|
||||
.args(["-d", "-k", "-c", src.to_str().unwrap()])
|
||||
.output()?;
|
||||
|
||||
if !output.status.success() {
|
||||
return Err(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
return Err(std::io::Error::other(
|
||||
format!(
|
||||
"xz decompress failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
|
||||
Reference in New Issue
Block a user