change function signature to get type name via intrinsics

This commit is contained in:
toidiu 2017-09-03 15:45:18 -04:00
parent f36580cb91
commit a3df0cf4de

View file

@ -102,6 +102,7 @@ use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
use std::cell::Cell;
use std::collections::{hash_map, HashMap, HashSet};
use std::default::Default;
use std::intrinsics;
use std::ops::Deref;
use std::option::Option;
use std::ptr;
@ -221,7 +222,7 @@ pub struct CancellableRunnable<T: Runnable + Send> {
}
impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {
fn name(&self) -> &'static str { self.inner.name() }
fn name(&self) -> &'static str { unsafe { intrinsics::type_name::<Self>() } }
fn is_cancelled(&self) -> bool {
self.cancelled.as_ref()