fix: resolve clippy nonminimal_bool and unexpected_cfgs on main (#2300)

This commit is contained in:
Dylan M. Taylor
2026-11-18 18:12:07 -05:00
committed by GitHub
parent ce7cefa554
commit 6e7e752947
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ fn known_formats_separate_build_disabled_and_unsupported_operations() {
#[cfg(not(feature = "raster-codecs"))]
assert_eq!(jpeg.read, Availability::BuildDisabled);
#[cfg(all(feature = "raster-codecs", feature = "jxl"))]
assert_eq!(Format::Jxl.capabilities().read, Availability::Available);
#[cfg(not(all(feature = "raster-codecs", feature = "jxl")))]
#[cfg(feature = "raster-codecs")]
assert!(matches!(Format::Jxl.capabilities().read, Availability::Available | Availability::Unsupported));
#[cfg(not(feature = "raster-codecs"))]
assert_eq!(Format::Jxl.capabilities().read, Availability::Unsupported);
#[cfg(not(feature = "raster-codecs"))]
assert_eq!(Format::Jxl.capabilities().write, Availability::BuildDisabled);
+1 -1
View File
@@ -180,7 +180,7 @@ fn clip_path_to_region(
}
// Some callers deliberately retain geometry even when the source has no paint. Keep that
// geometry clip-able as linework instead of silently deleting it.
if has_stroke || (!has_fill && !has_stroke) {
if has_stroke || !has_fill {
let polygons: Vec<Vec<Point>> =
flatten_contours(region)?.into_iter().filter(|(points, closed)| *closed && points.len() >= 3).map(|(points, _)| points).collect();
for (mut points, closed) in flatten_contours(path)? {