🗑️ Remove unused imports and format code
- Comment out `use std::simd::*` in pmoaudio as it's unused and modules import their own SIMD - Remove `Instant` from imports in track_metadata.rs (unused) - Reorder anyhow import to match Rust convention (`anyhow, Result` → `Result`) and remove unused imports - Improve XML response logging readability with line breaks in iterator chain + Refactor `get()` method to multi-line for clarity and consistency
This commit is contained in:
@@ -78,7 +78,7 @@ async fn main() {
|
||||
- **RwLock** : Pour partage concurrent du compteur [`TimerNode`]
|
||||
"#]
|
||||
#[cfg(feature = "simd")]
|
||||
use std::simd::*;
|
||||
// use std::simd::*; // Not actually used in this file, modules import their own simd
|
||||
|
||||
mod audio_chunk;
|
||||
mod audio_segment;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use pmometadata::{MetadataError, MetadataResult, TrackMetadata};
|
||||
use serde_json::{Number, Value};
|
||||
|
||||
@@ -2,12 +2,11 @@ use crate::errors::ControlPointError;
|
||||
use crate::model::TrackMetadata;
|
||||
use crate::soap_client::{
|
||||
decode_base64, ensure_success_with_envelope as ensure_success, extract_child_text,
|
||||
extract_child_text_allow_empty, extract_child_text_any, extract_child_text_local,
|
||||
extract_child_text_optional, extract_child_text_optional_local, find_child_with_suffix,
|
||||
handle_action_response,
|
||||
extract_child_text_any, extract_child_text_local, extract_child_text_optional,
|
||||
extract_child_text_optional_local, find_child_with_suffix, handle_action_response,
|
||||
invoke_upnp_action, parse_bool, parse_visible_flag,
|
||||
};
|
||||
use anyhow::{Result, anyhow};
|
||||
use anyhow::{anyhow, Result};
|
||||
use pmodidl::DIDLLite;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::{Duration, SystemTime};
|
||||
@@ -419,7 +418,9 @@ impl OhPlaylistClient {
|
||||
|
||||
// Log the raw IdArrayResponse XML for debugging
|
||||
{
|
||||
let raw_children: Vec<String> = response.children.iter()
|
||||
let raw_children: Vec<String> = response
|
||||
.children
|
||||
.iter()
|
||||
.map(|n: &xmltree::XMLNode| match n {
|
||||
xmltree::XMLNode::Element(e) => format!("{}={:?}", e.name, e.get_text()),
|
||||
_ => String::new(),
|
||||
@@ -767,7 +768,11 @@ impl SourceIndexCache {
|
||||
}
|
||||
|
||||
fn get(&self) -> Option<u32> {
|
||||
if self.is_valid() { self.index } else { None }
|
||||
if self.is_valid() {
|
||||
self.index
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn set(&mut self, index: u32) {
|
||||
|
||||
Reference in New Issue
Block a user