mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
cargo fix --edition-idioms
This commit is contained in:
parent
b1fd6237d1
commit
2012be4a8b
203 changed files with 665 additions and 1281 deletions
|
@ -2,12 +2,11 @@
|
|||
* 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/. */
|
||||
|
||||
extern crate toml;
|
||||
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Write};
|
||||
use std::path::Path;
|
||||
use toml;
|
||||
|
||||
fn main() {
|
||||
let lockfile_path = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap())
|
||||
|
|
|
@ -263,7 +263,7 @@ impl RenderNotifier {
|
|||
}
|
||||
|
||||
impl webrender_api::RenderNotifier for RenderNotifier {
|
||||
fn clone(&self) -> Box<webrender_api::RenderNotifier> {
|
||||
fn clone(&self) -> Box<dyn webrender_api::RenderNotifier> {
|
||||
Box::new(RenderNotifier::new(self.compositor_proxy.clone()))
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ use webrender_api::{self, DeviceIntPoint, DeviceUintSize};
|
|||
/// Sends messages to the compositor.
|
||||
pub struct CompositorProxy {
|
||||
pub sender: Sender<Msg>,
|
||||
pub event_loop_waker: Box<EventLoopWaker>,
|
||||
pub event_loop_waker: Box<dyn EventLoopWaker>,
|
||||
}
|
||||
|
||||
impl CompositorProxy {
|
||||
|
@ -98,7 +98,7 @@ pub enum Msg {
|
|||
/// Runs a closure in the compositor thread.
|
||||
/// It's used to dispatch functions from webrender to the main thread's event loop.
|
||||
/// Required to allow WGL GLContext sharing in Windows.
|
||||
Dispatch(Box<Fn() + Send>),
|
||||
Dispatch(Box<dyn Fn() + Send>),
|
||||
/// Indicates to the compositor that it needs to record the time when the frame with
|
||||
/// the given ID (epoch) is painted and report it to the layout thread of the given
|
||||
/// pipeline ID.
|
||||
|
|
|
@ -14,7 +14,7 @@ pub struct RenderTargetInfo {
|
|||
}
|
||||
|
||||
pub fn initialize_png(
|
||||
gl: &gl::Gl,
|
||||
gl: &dyn gl::Gl,
|
||||
width: DeviceUintLength,
|
||||
height: DeviceUintLength,
|
||||
) -> RenderTargetInfo {
|
||||
|
@ -80,7 +80,7 @@ pub fn initialize_png(
|
|||
}
|
||||
|
||||
pub fn draw_img(
|
||||
gl: &gl::Gl,
|
||||
gl: &dyn gl::Gl,
|
||||
render_target_info: RenderTargetInfo,
|
||||
width: DeviceUintLength,
|
||||
height: DeviceUintLength,
|
||||
|
|
|
@ -4,30 +4,8 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
extern crate embedder_traits;
|
||||
extern crate euclid;
|
||||
extern crate gfx_traits;
|
||||
#[cfg(feature = "gleam")]
|
||||
extern crate gleam;
|
||||
#[cfg(feature = "gleam")]
|
||||
extern crate image;
|
||||
extern crate ipc_channel;
|
||||
extern crate keyboard_types;
|
||||
extern crate libc;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate msg;
|
||||
extern crate net_traits;
|
||||
extern crate profile_traits;
|
||||
extern crate script_traits;
|
||||
extern crate servo_channel;
|
||||
extern crate servo_config;
|
||||
extern crate servo_geometry;
|
||||
extern crate servo_url;
|
||||
extern crate style_traits;
|
||||
extern crate time;
|
||||
extern crate webrender;
|
||||
extern crate webrender_api;
|
||||
|
||||
pub use crate::compositor::IOCompositor;
|
||||
pub use crate::compositor::RenderNotifier;
|
||||
|
|
|
@ -132,9 +132,9 @@ pub trait WindowMethods {
|
|||
fn prepare_for_composite(&self) -> bool;
|
||||
/// Return the GL function pointer trait.
|
||||
#[cfg(feature = "gleam")]
|
||||
fn gl(&self) -> Rc<gl::Gl>;
|
||||
fn gl(&self) -> Rc<dyn gl::Gl>;
|
||||
/// Returns a thread-safe object to wake up the window's event loop.
|
||||
fn create_event_loop_waker(&self) -> Box<EventLoopWaker>;
|
||||
fn create_event_loop_waker(&self) -> Box<dyn EventLoopWaker>;
|
||||
/// Get the coordinates of the native window, the screen and the framebuffer.
|
||||
fn get_coordinates(&self) -> EmbedderCoordinates;
|
||||
/// Set whether the application is currently animating.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue