Update dependencies to use new_debug_unrechable

Because reem/rust-debug-unreachable#6 makes `debug_unreachable` enable debug checks even in release builds since Rust 1.0.
This commit is contained in:
Matt Brubeck 2018-06-05 16:40:56 -07:00
parent a07c718895
commit f6404f0ec2
7 changed files with 69 additions and 89 deletions

View file

@ -32,7 +32,7 @@ bitflags = "1.0"
byteorder = "1.0"
cfg-if = "0.1.0"
cssparser = "0.23.0"
debug_unreachable = "0.1.1"
new_debug_unreachable = "1.0"
encoding_rs = {version = "0.7", optional = true}
euclid = "0.17"
fallible = { path = "../fallible" }
@ -49,7 +49,7 @@ matches = "0.1"
num_cpus = {version = "1.1.0", optional = true}
num-integer = "0.1.32"
num-traits = "0.1.32"
ordered-float = "0.4"
new-ordered-float = "1.0"
owning_ref = "0.3.3"
parking_lot = "0.5"
precomputed-hash = "0.1.1"

View file

@ -6,7 +6,7 @@
use app_units::Au;
use logical_geometry::WritingMode;
use ordered_float::NotNaN;
use ordered_float::NotNan;
use properties::LonghandId;
use std::fmt::{self, Write};
use std::ops::{Add, Neg};
@ -391,14 +391,14 @@ impl LengthOrPercentage {
// CSSFloat doesn't implement Hash, so does CSSPixelLength. Therefore, we still use Au as the
// hash key.
#[allow(missing_docs)]
pub fn to_hash_key(&self) -> (Au, NotNaN<f32>) {
pub fn to_hash_key(&self) -> (Au, NotNan<f32>) {
use self::LengthOrPercentage::*;
match *self {
Length(l) => (Au::from(l), NotNaN::new(0.0).unwrap()),
Percentage(p) => (Au(0), NotNaN::new(p.0).unwrap()),
Length(l) => (Au::from(l), NotNan::new(0.0).unwrap()),
Percentage(p) => (Au(0), NotNan::new(p.0).unwrap()),
Calc(c) => (
Au::from(c.unclamped_length()),
NotNaN::new(c.percentage()).unwrap(),
NotNan::new(c.percentage()).unwrap(),
),
}
}