[librsvg: 11/13] clippy: simplify a boolean expression




commit fa09b4bbad4f2577d3266e27ed240426bd3a7911
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Aug 4 20:11:43 2022 -0500

    clippy: simplify a boolean expression
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/724>

 src/c_api/handle.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/c_api/handle.rs b/src/c_api/handle.rs
index 9f6a19cca..decf9d784 100644
--- a/src/c_api/handle.rs
+++ b/src/c_api/handle.rs
@@ -1557,7 +1557,7 @@ pub unsafe extern "C" fn rsvg_handle_new_from_data(
     rsvg_return_val_if_fail! {
         rsvg_handle_new_from_data => ptr::null();
 
-        (!data.is_null() && data_len != 0) || (data_len == 0),
+        !data.is_null() || data_len == 0,
         data_len <= std::isize::MAX as usize,
         error.is_null() || (*error).is_null(),
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]