fix(ci): update depgraph argument and formatting
Code Quality / quality-checks (push) Has been cancelled
Metrics Collection / collect-metrics (push) Has been cancelled

- metrics.yml: use correct --dedup-transitive-deps flag
- render.rs: apply cargo fmt fixes
This commit is contained in:
2026-03-17 20:51:14 +01:00
parent a5115c0a15
commit c05d987ff1
2 changed files with 22 additions and 23 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ jobs:
- name: Generate dependency graph - name: Generate dependency graph
run: | run: |
cargo install cargo-depgraph cargo install cargo-depgraph
cargo depgraph --all-features --dedup-transitive --format dot > deps.dot cargo depgraph --all-features --dedup-transitive-deps --format dot > deps.dot
echo "Dependency graph generated: deps.dot" echo "Dependency graph generated: deps.dot"
echo "Total dependencies: $(cargo tree --depth 0 | wc -l)" echo "Total dependencies: $(cargo tree --depth 0 | wc -l)"
+21 -22
View File
@@ -499,33 +499,32 @@ impl Renderer {
let art_size = 56.0; let art_size = 56.0;
let spacing = 80.0; let spacing = 80.0;
if self.config.show_album_art if self.config.show_album_art && self.system_status.media_art_url != self.last_art_url {
&& self.system_status.media_art_url != self.last_art_url { self.last_art_url = self.system_status.media_art_url.clone();
self.last_art_url = self.system_status.media_art_url.clone(); self.media_art_surface = None;
self.media_art_surface = None; if let Some(ref data) = self.system_status.media_art_data {
if let Some(ref data) = self.system_status.media_art_data { if let Ok(img) = image::load_from_memory(data) {
if let Ok(img) = image::load_from_memory(data) { let img = img.to_rgba8();
let img = img.to_rgba8(); let (w, h) = img.dimensions();
let (w, h) = img.dimensions(); let mut surface =
let mut surface = ImageSurface::create(Format::ARgb32, w as i32, h as i32).unwrap();
ImageSurface::create(Format::ARgb32, w as i32, h as i32).unwrap(); {
{ let mut surface_data = surface.data().unwrap();
let mut surface_data = surface.data().unwrap(); for y in 0..h {
for y in 0..h { for x in 0..w {
for x in 0..w { let pixel = img.get_pixel(x, y);
let pixel = img.get_pixel(x, y); let idx = ((y * w + x) * 4) as usize;
let idx = ((y * w + x) * 4) as usize; surface_data[idx] = pixel[2];
surface_data[idx] = pixel[2]; surface_data[idx + 1] = pixel[1];
surface_data[idx + 1] = pixel[1]; surface_data[idx + 2] = pixel[0];
surface_data[idx + 2] = pixel[0]; surface_data[idx + 3] = pixel[3];
surface_data[idx + 3] = pixel[3];
}
} }
} }
self.media_art_surface = Some(surface);
} }
self.media_art_surface = Some(surface);
} }
} }
}
let has_art = self.config.show_album_art && self.media_art_surface.is_some(); let has_art = self.config.show_album_art && self.media_art_surface.is_some();
let text_x = if has_art { let text_x = if has_art {