mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Replace most usage of std::old_io::File.
This commit is contained in:
parent
4eb26065ac
commit
32d1e31c90
6 changed files with 32 additions and 25 deletions
|
@ -13,7 +13,8 @@ use rustc_serialize::json;
|
|||
|
||||
use std::borrow::ToOwned;
|
||||
use std::cell::RefCell;
|
||||
use std::old_io::File;
|
||||
use std::io::Write;
|
||||
use std::fs::File;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
|
||||
|
||||
thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None));
|
||||
|
@ -127,5 +128,5 @@ pub fn end_trace() {
|
|||
let result = json::encode(&root_scope).unwrap();
|
||||
let path = Path::new("layout_trace.json");
|
||||
let mut file = File::create(&path).unwrap();
|
||||
file.write_str(result.as_slice()).unwrap();
|
||||
file.write_all(result.as_bytes()).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue