mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgrade to rustc ba2f13ef0 2015-02-04
This commit is contained in:
parent
bc6882bdef
commit
d5dd1d658e
136 changed files with 1091 additions and 878 deletions
|
@ -7,9 +7,9 @@
|
|||
use libc::{c_char,c_int,c_void,size_t};
|
||||
use std::borrow::ToOwned;
|
||||
use std::ffi::CString;
|
||||
use std::io::timer::sleep;
|
||||
use std::old_io::timer::sleep;
|
||||
#[cfg(target_os="linux")]
|
||||
use std::io::File;
|
||||
use std::old_io::File;
|
||||
use std::mem;
|
||||
use std::mem::size_of;
|
||||
#[cfg(target_os="linux")]
|
||||
|
@ -222,7 +222,7 @@ fn get_proc_self_statm_field(field: uint) -> Option<u64> {
|
|||
match f.read_to_string() {
|
||||
Ok(contents) => {
|
||||
let s = option_try!(contents.as_slice().words().nth(field));
|
||||
let npages: u64 = option_try!(s.parse());
|
||||
let npages: u64 = option_try!(s.parse().ok());
|
||||
Some(npages * (page_size() as u64))
|
||||
}
|
||||
Err(_) => None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue