From 3bf976f02129eac55489fc277a6ffe9fd263557d Mon Sep 17 00:00:00 2001 From: Abdelrahman Ashraf Date: Fri, 10 Jan 2025 16:24:16 +0700 Subject: [PATCH] fix: lint --- dotlottie-rs/src/lottie_renderer/thorvg.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dotlottie-rs/src/lottie_renderer/thorvg.rs b/dotlottie-rs/src/lottie_renderer/thorvg.rs index f1a1e8ea..58ff8da9 100644 --- a/dotlottie-rs/src/lottie_renderer/thorvg.rs +++ b/dotlottie-rs/src/lottie_renderer/thorvg.rs @@ -226,7 +226,7 @@ impl Animation for TvgAnimation { let data_cstr = CString::new(data).unwrap(); let data_ptr: *const i8 = data_cstr.as_ptr(); - let data_len = data.as_bytes().len() as u32; + let data_len = data_cstr.as_bytes().len() as u32; let mimetype_ptr: *const i8 = mimetype_cstr.as_ptr(); unsafe { @@ -244,13 +244,7 @@ impl Animation for TvgAnimation { #[cfg(feature = "thorvg-v0")] { - tvg::tvg_picture_load_data( - self.raw_paint, - data_ptr, - data_len, - mimetype_ptr, - copy, - ) + tvg::tvg_picture_load_data(self.raw_paint, data_ptr, data_len, mimetype_ptr, copy) } } .into_result()