mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Audit and reduce unstable usage in gfx
Reasons behind existing unstable features: alloc: - weak pointers (may not belong) - boxed::into_raw and from_raw (naming) collections: - `Vec.push_all()` (May be replaced) - Replace with loop core: - `min_by` (#15311) - `PI_2` (naming) rustc_private: - FnVHasher - Can be replaced by rust-fnv std_misc: - Hash state stuff (no option here unless we want to stop using it) str_char: - CharRange usage - Can be replaced by regular iterators (char_indices)
This commit is contained in:
parent
e09c555a41
commit
ea9842723d
3 changed files with 4 additions and 5 deletions
|
@ -26,7 +26,7 @@ use text::TextRun;
|
||||||
use azure::azure::AzFloat;
|
use azure::azure::AzFloat;
|
||||||
use azure::azure_hl::Color;
|
use azure::azure_hl::Color;
|
||||||
|
|
||||||
use collections::linked_list::{self, LinkedList};
|
use std::collections::linked_list::{self, LinkedList};
|
||||||
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
|
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
|
||||||
use geom::approxeq::ApproxEq;
|
use geom::approxeq::ApproxEq;
|
||||||
use geom::num::Zero;
|
use geom::num::Zero;
|
||||||
|
@ -297,7 +297,7 @@ impl StackingContext {
|
||||||
|
|
||||||
if opts::get().dump_display_list_optimized {
|
if opts::get().dump_display_list_optimized {
|
||||||
println!("**** optimized display list. Tile bounds: {:?}", tile_bounds);
|
println!("**** optimized display list. Tile bounds: {:?}", tile_bounds);
|
||||||
display_list.print_items(String::from_str("*"));
|
display_list.print_items("*".to_owned());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort positioned children according to z-index.
|
// Sort positioned children according to z-index.
|
||||||
|
@ -560,7 +560,7 @@ impl StackingContext {
|
||||||
pub fn print(&self, mut indentation: String) {
|
pub fn print(&self, mut indentation: String) {
|
||||||
// We cover the case of an empty string.
|
// We cover the case of an empty string.
|
||||||
if indentation.len() == 0 {
|
if indentation.len() == 0 {
|
||||||
indentation = String::from_str("####");
|
indentation = "####".to_owned();
|
||||||
}
|
}
|
||||||
|
|
||||||
// We grow the indentation by 4 characters if needed.
|
// We grow the indentation by 4 characters if needed.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
use display_list::{DisplayItem, DisplayList, StackingContext};
|
use display_list::{DisplayItem, DisplayList, StackingContext};
|
||||||
|
|
||||||
use collections::linked_list::LinkedList;
|
use std::collections::linked_list::LinkedList;
|
||||||
use geom::rect::Rect;
|
use geom::rect::Rect;
|
||||||
use util::geometry::{self, Au};
|
use util::geometry::{self, Au};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
|
@ -18,7 +18,6 @@ extern crate log;
|
||||||
|
|
||||||
extern crate azure;
|
extern crate azure;
|
||||||
#[macro_use] extern crate bitflags;
|
#[macro_use] extern crate bitflags;
|
||||||
extern crate collections;
|
|
||||||
extern crate geom;
|
extern crate geom;
|
||||||
extern crate layers;
|
extern crate layers;
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue