fix(ci): Clippy-Hinweise seit Anhebung der Mindest-Rust-Version
Mit rust-version 1.92 meldet Clippy is_none_or statt map_or(true, …) und as_chunks statt chunks_exact mit fester Größe; die CI bricht bei Warnungen ab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -615,7 +615,7 @@ impl Page {
|
|||||||
let d = s.distance_to_point(pos);
|
let d = s.distance_to_point(pos);
|
||||||
if d <= max_dist {
|
if d <= max_dist {
|
||||||
let key = (s.is_image(), d);
|
let key = (s.is_image(), d);
|
||||||
if best.map_or(true, |(_, best_key)| key < best_key) {
|
if best.is_none_or(|(_, best_key)| key < best_key) {
|
||||||
best = Some((s, key));
|
best = Some((s, key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -564,7 +564,9 @@ fn render_pdf_raster(
|
|||||||
Ok(image) => {
|
Ok(image) => {
|
||||||
let rgb = image
|
let rgb = image
|
||||||
.pixels
|
.pixels
|
||||||
.chunks_exact(4)
|
.as_chunks::<4>()
|
||||||
|
.0
|
||||||
|
.iter()
|
||||||
.flat_map(|px| [px[0], px[1], px[2]])
|
.flat_map(|px| [px[0], px[1], px[2]])
|
||||||
.collect();
|
.collect();
|
||||||
rgb_xobject(image.width, image.height, rgb)
|
rgb_xobject(image.width, image.height, rgb)
|
||||||
|
|||||||
+1
-1
@@ -238,7 +238,7 @@ impl ImageLayer {
|
|||||||
let too_small = self
|
let too_small = self
|
||||||
.vertex_buffer
|
.vertex_buffer
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(true, |b| b.size() < bytes.len() as u64);
|
.is_none_or(|b| b.size() < bytes.len() as u64);
|
||||||
if too_small {
|
if too_small {
|
||||||
self.vertex_buffer = Some(device.create_buffer(&wgpu::BufferDescriptor {
|
self.vertex_buffer = Some(device.create_buffer(&wgpu::BufferDescriptor {
|
||||||
label: Some("Image Vertex Buffer"),
|
label: Some("Image Vertex Buffer"),
|
||||||
|
|||||||
Reference in New Issue
Block a user