diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-11-14 12:36:18 -0500 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-11-14 16:47:10 -0500 |
commit | 30ea7729393bf9a1048046df278b7ea427e30ee4 (patch) | |
tree | 4b7c78ae3ee5f7c2572a5ca05298e572898ea50c /components/util/str.rs | |
parent | 02a8e8dd16c87a5126ff7e331fc1ca353304278c (diff) | |
download | servo-30ea7729393bf9a1048046df278b7ea427e30ee4.tar.gz servo-30ea7729393bf9a1048046df278b7ea427e30ee4.zip |
Make util::str::parse_length work with floats
Diffstat (limited to 'components/util/str.rs')
-rw-r--r-- | components/util/str.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/util/str.rs b/components/util/str.rs index 9c1ddf51fef..de3b5eb42b9 100644 --- a/components/util/str.rs +++ b/components/util/str.rs @@ -367,7 +367,7 @@ pub fn parse_length(mut value: &str) -> LengthOrPercentageOrAuto { } match FromStr::from_str(value) { - Ok(number) => LengthOrPercentageOrAuto::Length(Au::from_px(number)), + Ok(number) => LengthOrPercentageOrAuto::Length(Au::from_f64_px(number)), Err(_) => LengthOrPercentageOrAuto::Auto, } } |