[librsvg: 13/16] clippy: allow a let binding with unit type; we use it for a guard




commit 91d5992cb03fe104880cc924e4c3ee5a65b10f84
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Sep 15 19:25:41 2022 -0500

    clippy: allow a let binding with unit type; we use it for a guard
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/747>

 src/xml/xml2_load.rs | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/xml/xml2_load.rs b/src/xml/xml2_load.rs
index 22341db1a..cb21123d1 100644
--- a/src/xml/xml2_load.rs
+++ b/src/xml/xml2_load.rs
@@ -226,6 +226,8 @@ unsafe extern "C" fn sax_start_element_ns_cb(
             }
         };
 
+    // This clippy::let_unit_value is for the "let _: () = e" guard below.
+    #[allow(clippy::let_unit_value)]
     if let Err(e) = xml2_parser.state.start_element(qual_name, attrs) {
         let _: () = e; // guard in case we change the error type later
 


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