Make Animatable::get_zero_value return a Result<Self, ()>

This commit is contained in:
Anthony Ramine 2017-06-30 15:35:55 +02:00
parent 7b82d3b97b
commit 6f6ee6e036
2 changed files with 53 additions and 57 deletions

View file

@ -375,7 +375,7 @@ pub extern "C" fn Servo_AnimationValues_GetZeroValue(
-> RawServoAnimationValueStrong
{
let value_to_match = AnimationValue::as_arc(&value_to_match);
if let Some(zero_value) = value_to_match.get_zero_value() {
if let Ok(zero_value) = value_to_match.get_zero_value() {
Arc::new(zero_value).into_strong()
} else {
RawServoAnimationValueStrong::null()