refactor: Fix compilation warnings across multiple crates

- Remove unused imports (Filter, Digest, Resource, etc.)
- Prefix unused variables with underscore (_pk, _size)
- Fix snake_case naming for local variables
- Remove unused ArgumentError enum in pmoupnp
- Apply cargo fix suggestions for unused imports

Remaining warnings are async_fn_in_trait style warnings which
would require API breaking changes to address.
This commit is contained in:
Claude
2025-11-04 22:20:35 +00:00
parent 701decfc55
commit 5d88d3a25e
10 changed files with 19 additions and 43 deletions

View File

@@ -122,10 +122,10 @@ impl SourceCacheManager {
let cache = self.track_cache.read().await;
if let Some(metadata) = cache.get(object_id) {
if let Some(ref pk) = metadata.cached_audio_pk {
if let Some(ref _pk) = metadata.cached_audio_pk {
#[cfg(feature = "server")]
{
let url = pmoupnp::cache_registry::build_audio_url(pk, Some("stream"))
let url = pmoupnp::cache_registry::build_audio_url(_pk, Some("stream"))
.map_err(|e| MusicSourceError::CacheError(e.to_string()))?;
return Ok(url);
}
@@ -147,7 +147,7 @@ impl SourceCacheManager {
let cache = self.track_cache.read().await;
if let Some(metadata) = cache.get(object_id) {
if let Some(ref pk) = metadata.cached_audio_pk {
if let Some(ref _pk) = metadata.cached_audio_pk {
// TODO: Ajouter get_info() à AudioCache
// Pour l'instant, on retourne juste Cached sans taille
return Ok(CacheStatus::Cached { size_bytes: 0 });
@@ -181,10 +181,10 @@ impl SourceCacheManager {
/// # Returns
///
/// L'URL complète de l'image
pub fn cover_url(&self, pk: &str, size: Option<usize>) -> Result<String> {
pub fn cover_url(&self, _pk: &str, _size: Option<usize>) -> Result<String> {
#[cfg(feature = "server")]
{
pmoupnp::cache_registry::build_cover_url(pk, size)
pmoupnp::cache_registry::build_cover_url(_pk, _size)
.map_err(|e| MusicSourceError::CacheError(e.to_string()))
}
#[cfg(not(feature = "server"))]