Skip to content

Commit

Permalink
Update dependencies to use new_debug_unrechable
Browse files Browse the repository at this point in the history
Because reem/rust-debug-unreachable#6 makes `debug_unreachable` enable debug checks even in release builds since Rust 1.0.
  • Loading branch information
mbrubeck committed Jun 6, 2018
1 parent a07c718 commit f6404f0
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 89 deletions.
132 changes: 56 additions & 76 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/gfx/Cargo.toml
Expand Up @@ -29,7 +29,7 @@ libc = "0.2"
log = "0.4"
malloc_size_of = { path = "../malloc_size_of" }
net_traits = {path = "../net_traits"}
ordered-float = "0.4"
new-ordered-float = "1.0"
range = {path = "../range"}
serde = "1.0"
servo_arc = {path = "../servo_arc"}
Expand Down
4 changes: 2 additions & 2 deletions components/gfx/font.rs
Expand Up @@ -6,7 +6,7 @@ use app_units::Au;
use euclid::{Point2D, Rect, Size2D};
use font_context::{FontContext, FontSource};
use font_template::FontTemplateDescriptor;
use ordered_float::NotNaN;
use ordered_float::NotNan;
use platform::font::{FontHandle, FontTable};
use platform::font_context::FontContextHandle;
pub use platform::font_list::fallback_font_families;
Expand Down Expand Up @@ -195,7 +195,7 @@ pub struct ShapingOptions {
/// NB: You will probably want to set the `IGNORE_LIGATURES_SHAPING_FLAG` if this is non-null.
pub letter_spacing: Option<Au>,
/// Spacing to add between each word. Corresponds to the CSS 2.1 `word-spacing` property.
pub word_spacing: (Au, NotNaN<f32>),
pub word_spacing: (Au, NotNan<f32>),
/// The Unicode script property of the characters in this run.
pub script: Script,
/// Various flags.
Expand Down
2 changes: 1 addition & 1 deletion components/layout/Cargo.toml
Expand Up @@ -27,7 +27,7 @@ log = "0.4"
malloc_size_of = { path = "../malloc_size_of" }
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
ordered-float = "0.4"
new-ordered-float = "1.0"
parking_lot = "0.5"
profile_traits = {path = "../profile_traits"}
range = {path = "../range"}
Expand Down
4 changes: 2 additions & 2 deletions components/layout/text.rs
Expand Up @@ -16,7 +16,7 @@ use gfx::text::text_run::TextRun;
use gfx::text::util::{self, CompressionMode};
use inline::{InlineFragmentNodeFlags, InlineFragments};
use linked_list::split_off_head;
use ordered_float::NotNaN;
use ordered_float::NotNan;
use range::Range;
use servo_atoms::Atom;
use std::borrow::ToOwned;
Expand Down Expand Up @@ -183,7 +183,7 @@ impl TextRunScanner {
letter_spacing = inherited_text_style.letter_spacing;
word_spacing = inherited_text_style.word_spacing.value()
.map(|lop| lop.to_hash_key())
.unwrap_or((Au(0), NotNaN::new(0.0).unwrap()));
.unwrap_or((Au(0), NotNan::new(0.0).unwrap()));
text_rendering = inherited_text_style.text_rendering;
word_break = inherited_text_style.word_break;
}
Expand Down
4 changes: 2 additions & 2 deletions components/style/Cargo.toml
Expand Up @@ -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" }
Expand All @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions components/style/values/computed/length.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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(),
),
}
}
Expand Down

0 comments on commit f6404f0

Please sign in to comment.