Skip to content

Conversation

lucascompython
Copy link

No description provided.

@lucascompython
Copy link
Author

lucascompython commented Jul 29, 2025

I ran tests and used it in my project that depends on this library and didn't get any issues.

Copy link
Owner

@jaredforth jaredforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this PR!

There are a couple merge conflicts now

@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 13:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the codebase to the 2024 Rust edition, addresses clippy warnings, and updates to a newer version of libwebp-sys. The changes primarily focus on code modernization and following current Rust best practices.

Key changes:

  • Updates Rust edition from 2018 to 2024 in Cargo.toml
  • Modernizes string formatting to use newer interpolation syntax
  • Removes unnecessary explicit dereferences and type conversions
  • Updates libwebp-sys dependency from 0.9.3 to 0.13

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Updates edition to 2024 and libwebp-sys to version 0.13
src/shared.rs Modernizes string formatting and removes unnecessary dereference
src/lib.rs Updates println! to use string interpolation
src/encoder.rs Simplifies function calls and adds unsafe blocks for clarity
src/decoder.rs Updates assertion message formatting
src/animation_encoder.rs Refactors imports, simplifies method calls, and adds unsafe blocks
src/animation_decoder.rs Adds clippy allow directive and implements is_empty method
examples/animation_decode.rs Modernizes loop with enumerate and string formatting
examples/animation.rs Removes unnecessary type cast

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 86 to 87
impl From<&AnimFrame<'_>> for DynamicImage {
fn from(val: &AnimFrame<'_>) -> Self {
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The conversion from Into<DynamicImage> to From<&AnimFrame<'_>> for DynamicImage is correct and follows Rust best practices, but the lifetime parameter should be explicit rather than using the anonymous lifetime '_ in the impl block for better clarity.

Suggested change
impl From<&AnimFrame<'_>> for DynamicImage {
fn from(val: &AnimFrame<'_>) -> Self {
impl<'a> From<&'a AnimFrame<'a>> for DynamicImage {
fn from(val: &'a AnimFrame<'a>) -> Self {

Copilot uses AI. Check for mistakes.

@lucascompython
Copy link
Author

All tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants