Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Dec 26, 2023
1 parent abbd115 commit 26ccad5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/c_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub struct GifskiHandleInternal {
/// Returns a handle for the other functions, or `NULL` on error (if the settings are invalid).
#[no_mangle]
pub unsafe extern "C" fn gifski_new(settings: *const GifskiSettings) -> *const GifskiHandle {
let settings = if let Some(s) = settings.as_ref() {s} else {
let Some(settings) = settings.as_ref() else {
return ptr::null_mut();
};
let s = Settings {
Expand Down
1 change: 1 addition & 0 deletions src/denoise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ impl Acc {
};
// min == 0 may wipe pixels totally clear, so give them at least a second chance,
// if quality setting allows
#[allow(overlapping_range_endpoints)]
let min = match threshold {
0..=300 if self.stayed_for <= 3 => 1, // q >= 75
300..=500 if self.stayed_for <= 2 => 1,
Expand Down
4 changes: 2 additions & 2 deletions src/gifsicle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ impl GiflossyWriter {
pal,
image,
max_diff: self.loss,
best_node: px as NodeId,
best_node: u16::from(px),
best_pos: pos + 1,
best_total_diff: 0,
};
l.lossy_node(pos + 1, px as NodeId, 0, RgbDiff { r: 0, g: 0, b: 0 }, );
l.lossy_node(pos + 1, u16::from(px), 0, RgbDiff { r: 0, g: 0, b: 0 }, );
run = l.best_pos - pos;
pos = l.best_pos;
let selected_node = &code_table.nodes[l.best_node as usize];
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ impl Writer {
debug_assert!(end_pts > 0.);

to_remap.send(QuantizeMessage {
end_pts, image, importance_map, ordinal_frame_number, frame_index, dispose, first_frame_has_transparency, prev_frame_keeps
ordinal_frame_number, frame_index, first_frame_has_transparency, image, importance_map, prev_frame_keeps, dispose, end_pts
})?;

frame_index += 1;
Expand Down

0 comments on commit 26ccad5

Please sign in to comment.