mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #8937 - saneyuki:warning, r=mbrubeck
Fix some warnings <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8937) <!-- Reviewable:end -->
This commit is contained in:
commit
2977795e39
6 changed files with 9 additions and 12 deletions
|
@ -2,8 +2,8 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(clone_from_slice)]
|
||||
#![feature(nonzero)]
|
||||
#![feature(slice_bytes)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ use ipc_channel::router::ROUTER;
|
|||
use layers::platform::surface::NativeSurface;
|
||||
use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes};
|
||||
use std::borrow::ToOwned;
|
||||
use std::slice::bytes::copy_memory;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use util::task::spawn_named;
|
||||
use util::vec::byte_swap;
|
||||
|
@ -365,7 +364,7 @@ impl WebGLPaintTask {
|
|||
let dst_start = y * stride;
|
||||
let src_start = (height - y - 1) * stride;
|
||||
let src_slice = &orig_pixels[src_start .. src_start + stride];
|
||||
copy_memory(&src_slice[..stride], &mut pixels[dst_start .. dst_start + stride]);
|
||||
(&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]);
|
||||
}
|
||||
|
||||
// rgba -> bgra
|
||||
|
|
|
@ -44,7 +44,6 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::fs::File;
|
||||
use std::mem as std_mem;
|
||||
use std::rc::Rc;
|
||||
use std::slice::bytes::copy_memory;
|
||||
use std::sync::mpsc::Sender;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use surface_map::SurfaceMap;
|
||||
|
@ -1913,8 +1912,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
let dst_start = y * stride;
|
||||
let src_start = (height - y - 1) * stride;
|
||||
let src_slice = &orig_pixels[src_start .. src_start + stride];
|
||||
copy_memory(&src_slice[..stride],
|
||||
&mut pixels[dst_start .. dst_start + stride]);
|
||||
(&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]);
|
||||
}
|
||||
RgbImage::from_raw(width as u32, height as u32, pixels).unwrap()
|
||||
}
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(box_syntax)]
|
||||
#![feature(clone_from_slice)]
|
||||
#![feature(custom_derive)]
|
||||
#![feature(iter_cmp)]
|
||||
#![feature(plugin)]
|
||||
#![feature(slice_bytes)]
|
||||
#![feature(mpsc_select)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//! reduce coupling between these two components.
|
||||
|
||||
use euclid::scale_factor::ScaleFactor;
|
||||
use euclid::size::{Size2D, TypedSize2D};
|
||||
use euclid::size::TypedSize2D;
|
||||
use hyper::header::Headers;
|
||||
use hyper::method::Method;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcSharedMemory};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#![crate_name = "webdriver_server"]
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
#![feature(ip_addr, plugin)]
|
||||
#![feature(plugin)]
|
||||
#![plugin(plugins)]
|
||||
|
||||
extern crate compositing;
|
||||
|
@ -37,7 +37,7 @@ use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
|
|||
use rustc_serialize::json::{Json, ToJson};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::BTreeMap;
|
||||
use std::net::SocketAddr;
|
||||
use std::net::{SocketAddr, SocketAddrV4};
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
@ -63,7 +63,8 @@ fn extension_routes() -> Vec<(Method, &'static str, ServoExtensionRoute)> {
|
|||
pub fn start_server(port: u16, constellation_chan: Sender<ConstellationMsg>) {
|
||||
let handler = Handler::new(constellation_chan);
|
||||
spawn_named("WebdriverHttpServer".to_owned(), move || {
|
||||
server::start(SocketAddr::new("0.0.0.0".parse().unwrap(), port), handler,
|
||||
let address = SocketAddrV4::new("0.0.0.0".parse().unwrap(), port);
|
||||
server::start(SocketAddr::V4(address), handler,
|
||||
extension_routes());
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue