Fix some warnings new in Rust Nightly

This commit is contained in:
Simon Sapin 2019-11-08 11:45:16 +01:00
parent f2e7b4ec8c
commit 94b19beefb
8 changed files with 10 additions and 14 deletions

View file

@ -63,7 +63,7 @@ pub enum WebGLMsg {
WebGLVersion,
Size2D<u32>,
GLContextAttributes,
WebGLSender<Result<(WebGLCreateContextResult), String>>,
WebGLSender<Result<WebGLCreateContextResult, String>>,
),
/// Resizes a WebGLContext.
ResizeContext(WebGLContextId, Size2D<u32>, WebGLSender<Result<(), String>>),

View file

@ -90,7 +90,7 @@ impl NetworkListener {
}
}
fn check_redirect(&mut self, message: Result<(FetchMetadata), NetworkError>) {
fn check_redirect(&mut self, message: Result<FetchMetadata, NetworkError>) {
match message {
Ok(res_metadata) => {
let metadata = match res_metadata {

View file

@ -38,11 +38,11 @@ pub enum DeviceIndependentPixel {}
// See https://bugzilla.mozilla.org/show_bug.cgi?id=177805 for more info.
pub trait MaxRect {
#[inline(always)]
fn max_rect() -> Self;
}
impl MaxRect for Rect<Au> {
#[inline]
fn max_rect() -> Rect<Au> {
Rect::new(
Point2D::new(MIN_AU / 2, MIN_AU / 2),
@ -52,6 +52,7 @@ impl MaxRect for Rect<Au> {
}
impl MaxRect for LayoutRect {
#[inline]
fn max_rect() -> LayoutRect {
LayoutRect::new(
LayoutPoint::new(f32::MIN / 2.0, f32::MIN / 2.0),

View file

@ -1702,7 +1702,7 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
type Item = &'a K;
#[inline]
fn next(&mut self) -> Option<(&'a K)> {
fn next(&mut self) -> Option<&'a K> {
self.inner.next().map(|(k, _)| k)
}
#[inline]
@ -1721,7 +1721,7 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
type Item = &'a V;
#[inline]
fn next(&mut self) -> Option<(&'a V)> {
fn next(&mut self) -> Option<&'a V> {
self.inner.next().map(|(_, v)| v)
}
#[inline]
@ -1739,7 +1739,7 @@ impl<'a, K, V> Iterator for ValuesMut<'a, K, V> {
type Item = &'a mut V;
#[inline]
fn next(&mut self) -> Option<(&'a mut V)> {
fn next(&mut self) -> Option<&'a mut V> {
self.inner.next().map(|(_, v)| v)
}
#[inline]

View file

@ -221,7 +221,6 @@ pub trait ThreadSafeLayoutNode:
fn children(&self) -> LayoutIterator<Self::ChildrenIterator>;
/// Returns a ThreadSafeLayoutElement if this is an element, None otherwise.
#[inline]
fn as_element(&self) -> Option<Self::ConcreteThreadSafeLayoutElement>;
#[inline]
@ -348,14 +347,12 @@ pub trait ThreadSafeLayoutElement:
/// lazily_compute_pseudo_element_style, which operates on TElement.
unsafe fn unsafe_get(self) -> Self::ConcreteElement;
#[inline]
fn get_attr(&self, namespace: &Namespace, name: &LocalName) -> Option<&str>;
fn get_attr_enum(&self, namespace: &Namespace, name: &LocalName) -> Option<&AttrValue>;
fn style_data(&self) -> AtomicRef<ElementData>;
#[inline]
fn get_pseudo_element_type(&self) -> PseudoElementType;
#[inline]

View file

@ -239,9 +239,9 @@ pub enum ScriptMsg {
/// Get Window Informations size and position
GetClientWindow(IpcSender<(DeviceIntSize, DeviceIntPoint)>),
/// Get the screen size (pixel)
GetScreenSize(IpcSender<(DeviceIntSize)>),
GetScreenSize(IpcSender<DeviceIntSize>),
/// Get the available screen size (pixel)
GetScreenAvailSize(IpcSender<(DeviceIntSize)>),
GetScreenAvailSize(IpcSender<DeviceIntSize>),
}
impl fmt::Debug for ScriptMsg {

View file

@ -48,7 +48,7 @@ type ComputedVariationValue = VariationValue<Number>;
// FIXME: Could do a rename, this is only used for font variations.
struct FontSettingTagIterState<'a> {
tags: Vec<(&'a ComputedVariationValue)>,
tags: Vec<&'a ComputedVariationValue>,
index: usize,
prev_tag: FontTag,
}

View file

@ -302,10 +302,8 @@ pub trait ToComputedValue {
/// Convert a specified value to a computed value, using itself and the data
/// inside the `Context`.
#[inline]
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue;
#[inline]
/// Convert a computed value to specified value form.
///
/// This will be used for recascading during animation.