mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Fix some warnings
This commit is contained in:
parent
641b374f0b
commit
d560ae79b4
3 changed files with 9 additions and 9 deletions
|
@ -512,7 +512,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
||||||
match ipc::channel() {
|
match ipc::channel() {
|
||||||
Ok((sender, receiver)) => {
|
Ok((sender, receiver)) => {
|
||||||
self.time_profiler_chan.send(time::ProfilerMsg::Exit(sender));
|
self.time_profiler_chan.send(time::ProfilerMsg::Exit(sender));
|
||||||
receiver.recv();
|
let _ = receiver.recv();
|
||||||
},
|
},
|
||||||
Err(_) => {},
|
Err(_) => {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,14 @@ pub struct FileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FileManager {
|
impl FileManager {
|
||||||
fn new(recv: IpcReceiver<FileManagerThreadMsg>) -> FileManager {
|
pub fn new(recv: IpcReceiver<FileManagerThreadMsg>) -> FileManager {
|
||||||
FileManager {
|
FileManager {
|
||||||
receiver: recv,
|
receiver: recv,
|
||||||
idmap: RefCell::new(HashMap::new()),
|
idmap: RefCell::new(HashMap::new()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_thread() -> IpcSender<FileManagerThreadMsg> {
|
pub fn new_thread() -> IpcSender<FileManagerThreadMsg> {
|
||||||
let (chan, recv) = ipc::channel().unwrap();
|
let (chan, recv) = ipc::channel().unwrap();
|
||||||
|
|
||||||
spawn_named("FileManager".to_owned(), move || {
|
spawn_named("FileManager".to_owned(), move || {
|
||||||
|
|
|
@ -85,7 +85,7 @@ impl Formattable for Option<TimerMetadata> {
|
||||||
impl Formattable for ProfilerCategory {
|
impl Formattable for ProfilerCategory {
|
||||||
// some categories are subcategories of LayoutPerformCategory
|
// some categories are subcategories of LayoutPerformCategory
|
||||||
// and should be printed to indicate this
|
// and should be printed to indicate this
|
||||||
fn format(&self, output: &Option<OutputOptions>) -> String {
|
fn format(&self, _output: &Option<OutputOptions>) -> String {
|
||||||
let padding = match *self {
|
let padding = match *self {
|
||||||
ProfilerCategory::LayoutStyleRecalc |
|
ProfilerCategory::LayoutStyleRecalc |
|
||||||
ProfilerCategory::LayoutRestyleDamagePropagation |
|
ProfilerCategory::LayoutRestyleDamagePropagation |
|
||||||
|
@ -213,7 +213,7 @@ impl Profiler {
|
||||||
match port.recv() {
|
match port.recv() {
|
||||||
Err(_) => break,
|
Err(_) => break,
|
||||||
Ok(ProfilerMsg::Exit(chan)) => {
|
Ok(ProfilerMsg::Exit(chan)) => {
|
||||||
chan.send(());
|
let _ = chan.send(());
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -315,7 +315,7 @@ impl Profiler {
|
||||||
ProfilerMsg::Exit(chan) => {
|
ProfilerMsg::Exit(chan) => {
|
||||||
heartbeats::cleanup();
|
heartbeats::cleanup();
|
||||||
self.print_buckets();
|
self.print_buckets();
|
||||||
chan.send(());
|
let _ = chan.send(());
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -334,7 +334,7 @@ impl Profiler {
|
||||||
Ok(file) => file,
|
Ok(file) => file,
|
||||||
};
|
};
|
||||||
write!(file, "_category_, _incremental?_, _iframe?_, _url_, _mean (ms)_, _median (ms)_, _min (ms)_, \
|
write!(file, "_category_, _incremental?_, _iframe?_, _url_, _mean (ms)_, _median (ms)_, _min (ms)_, \
|
||||||
_max (ms)_, _events_\n");
|
_max (ms)_, _events_\n").unwrap();
|
||||||
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
|
for (&(ref category, ref meta), ref mut data) in &mut self.buckets {
|
||||||
data.sort_by(|a, b| {
|
data.sort_by(|a, b| {
|
||||||
if a < b {
|
if a < b {
|
||||||
|
@ -352,11 +352,11 @@ impl Profiler {
|
||||||
data.iter().fold(-f64::INFINITY, |a, &b| a.max(b)));
|
data.iter().fold(-f64::INFINITY, |a, &b| a.max(b)));
|
||||||
write!(file, "{}, {}, {:15.4}, {:15.4}, {:15.4}, {:15.4}, {:15}\n",
|
write!(file, "{}, {}, {:15.4}, {:15.4}, {:15.4}, {:15.4}, {:15}\n",
|
||||||
category.format(&self.output), meta.format(&self.output),
|
category.format(&self.output), meta.format(&self.output),
|
||||||
mean, median, min, max, data_len);
|
mean, median, min, max, data_len).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Some(OutputOptions::Stdout(ref period)) => {
|
Some(OutputOptions::Stdout(_)) => {
|
||||||
let stdout = io::stdout();
|
let stdout = io::stdout();
|
||||||
let mut lock = stdout.lock();
|
let mut lock = stdout.lock();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue