mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Use Finite<T> for our dom code (excluding CanvasRenderingContext2D)
This commit is contained in:
parent
4c96732077
commit
9cd1b2c158
4 changed files with 24 additions and 17 deletions
|
@ -259,7 +259,7 @@ impl FromJSValConvertible for f32 {
|
|||
|
||||
impl ToJSValConvertible for Finite<f32> {
|
||||
fn to_jsval(&self, cx: *mut JSContext) -> JSVal {
|
||||
let value = self.clone().unwrap();
|
||||
let value = **self;
|
||||
value.to_jsval(cx)
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ impl FromJSValConvertible for f64 {
|
|||
impl ToJSValConvertible for Finite<f64> {
|
||||
#[inline]
|
||||
fn to_jsval(&self, cx: *mut JSContext) -> JSVal {
|
||||
let value = self.clone().unwrap();
|
||||
let value = **self;
|
||||
value.to_jsval(cx)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue