Skip to content

Commit

Permalink
Use &[u8] instead of Bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Jun 19, 2024
1 parent 95ab674 commit 7020eeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui_extras/src/loaders/gif_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct AnimatedImage {
}

impl AnimatedImage {
fn load_gif(data: Bytes) -> Result<Self, String> {
fn load_gif(data: &[u8]) -> Result<Self, String> {
let decoder = image::codecs::gif::GifDecoder::new(Cursor::new(data))
.map_err(|err| format!("Failed to decode gif: {err}"))?;
let mut images = vec![];
Expand Down

0 comments on commit 7020eeb

Please sign in to comment.