[librsvg/librsvg-2.46] marker: prefer "if let"



commit 1638bfc3e1c8988129f96bf73ed6439fd10c398b
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:15:49 2019 +0200

    marker: prefer "if let"

 rsvg_internals/src/marker.rs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/marker.rs b/rsvg_internals/src/marker.rs
index 26a784dd..21c22894 100644
--- a/rsvg_internals/src/marker.rs
+++ b/rsvg_internals/src/marker.rs
@@ -654,9 +654,8 @@ pub fn render_markers_for_path_builder(
     let marker_mid = &values.marker_mid.0;
     let marker_end = &values.marker_end.0;
 
-    match (marker_start, marker_mid, marker_end) {
-        (&IRI::None, &IRI::None, &IRI::None) => return Ok(draw_ctx.empty_bbox()),
-        _ => (),
+    if let (&IRI::None, &IRI::None, &IRI::None) = (marker_start, marker_mid, marker_end) {
+        return Ok(draw_ctx.empty_bbox());
     }
 
     emit_markers_for_path_builder(


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