fix: 修复构建错误并清理未使用导入

This commit is contained in:
mofeng-git
2026-05-18 15:23:42 +00:00
parent 935fa823f2
commit e774210ae3
4 changed files with 12 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ use std::time::Instant;
use tokio::sync::{broadcast, watch, Mutex};
use tracing::{debug, info};
use super::device::AudioDeviceInfo;
use crate::audio::device::AudioDeviceInfo;
use crate::error::{AppError, Result};
use crate::utils::LogThrottler;
use crate::{error_throttled, warn_throttled};

View File

@@ -6,13 +6,15 @@
use async_trait::async_trait;
use parking_lot::Mutex;
use std::fs::{self, File, OpenOptions};
use std::io::{Read, Write};
use std::io::Read;
use std::os::fd::AsFd;
use std::os::unix::fs::OpenOptionsExt;
use std::path::PathBuf;
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering};
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use nix::poll::{poll, PollFd, PollFlags, PollTimeout};
use tokio::sync::watch;
use tracing::{debug, info, trace, warn};

View File

@@ -1,13 +1,9 @@
#[cfg(unix)]
use std::fs::{File, OpenOptions};
use std::fs::File;
#[cfg(unix)]
use std::io::{Read, Write};
#[cfg(unix)]
use std::os::unix::fs::OpenOptionsExt;
use std::io::Write;
#[cfg(unix)]
use std::os::unix::io::AsFd;
#[cfg(unix)]
use std::path::PathBuf;
#[cfg(unix)]
use nix::poll::{poll, PollFd, PollFlags, PollTimeout};

View File

@@ -5,8 +5,14 @@ use crate::msd::{
ImageManager, MsdConnectRequest, MsdMode, MsdState, VentoyDrive,
};
#[cfg(unix)]
use axum::body::Body;
#[cfg(unix)]
use axum::extract::{Multipart, Path as AxumPath};
#[cfg(unix)]
use axum::http::{header, StatusCode};
#[cfg(unix)]
use axum::response::Response;
#[cfg(unix)]
use std::collections::HashMap;
/// MSD status response