Bug 1354947 - Use match instead of 'if let'. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 02 May 2017 18:52:36 +0900
changeset 571298 22ede62d9fb627417289205305a10b8123d0fd87
parent 571297 58017ba20912ea15f022096f86075475c795539d
child 571299 6e182278c25904881ef2e5649b7ec7d0b0f98cec
push id56743
push userhikezoe@mozilla.com
push dateTue, 02 May 2017 10:26:16 +0000
reviewersbirtles
bugs1354947
milestone55.0a1
Bug 1354947 - Use match instead of 'if let'. r?birtles MozReview-Commit-ID: DMcRmsyABOz
servo/ports/geckolib/glue.rs
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -2101,20 +2101,19 @@ pub extern "C" fn Servo_StyleSet_FillKey
     };
 
     let style = ComputedValues::as_arc(&style);
     let global_style_data = &*GLOBAL_STYLE_DATA;
     let guard = global_style_data.shared_lock.read();
 
     for step in &animation.steps {
         // Override timing_function if the keyframe has animation-timing-function.
-        let timing_function = if let Some(val) = step.get_animation_timing_function(&guard) {
-            val.into()
-        } else {
-            *timing_function
+        let timing_function = match step.get_animation_timing_function(&guard) {
+            Some(val) => val.into(),
+            None => *timing_function,
         };
 
         let keyframe = unsafe {
             Gecko_AnimationAppendKeyframe(keyframes,
                                           step.start_percentage.0 as f32,
                                           &timing_function)
         };