Skip to content

Commit

Permalink
Use the packed_simd crate instead of std::simd
Browse files Browse the repository at this point in the history
`std::simd` was removed in rust-lang/rust#52535.
https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
  • Loading branch information
SimonSapin committed Jul 27, 2018
1 parent 65df9cb commit 1c0941f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 21 deletions.
47 changes: 30 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion components/gfx/Cargo.toml
Expand Up @@ -13,7 +13,7 @@ test = false
doctest = false

[features]
unstable = []
unstable = ["packed_simd"]

[dependencies]
app_units = "0.6"
Expand All @@ -30,6 +30,7 @@ log = "0.4"
malloc_size_of = { path = "../malloc_size_of" }
net_traits = {path = "../net_traits"}
new-ordered-float = "1.0"
packed_simd = {version = "0.1", optional = true}
range = {path = "../range"}
serde = "1.0"
servo_arc = {path = "../servo_arc"}
Expand Down
3 changes: 2 additions & 1 deletion components/gfx/lib.rs
Expand Up @@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#![cfg_attr(feature = "unstable", feature(stdsimd))]
#![deny(unsafe_code)]

extern crate app_units;
Expand Down Expand Up @@ -43,6 +42,8 @@ extern crate log;
extern crate malloc_size_of;
extern crate net_traits;
extern crate ordered_float;
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
extern crate packed_simd;
extern crate range;
#[macro_use] extern crate serde;
extern crate servo_arc;
Expand Down
4 changes: 2 additions & 2 deletions components/gfx/text/glyph.rs
Expand Up @@ -4,11 +4,11 @@

use app_units::Au;
use euclid::Point2D;
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
use packed_simd::u32x4;
use range::{self, EachIndex, Range, RangeIndex};
use std::{fmt, mem, u16};
use std::cmp::{Ordering, PartialOrd};
#[cfg(all(feature = "unstable", any(target_feature = "sse2", target_feature = "neon")))]
use std::simd::u32x4;
use std::vec::Vec;

pub use gfx_traits::ByteIndex;
Expand Down

0 comments on commit 1c0941f

Please sign in to comment.