mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
cargo-fix for 2021
This commit is contained in:
parent
c2778b9bef
commit
dffb75a4c6
12 changed files with 69 additions and 69 deletions
|
@ -142,7 +142,7 @@ impl App {
|
|||
}
|
||||
|
||||
// This function decides whether the event should be handled during `run_forever`.
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::Event<ServoEvent>) {
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::Event<'_, ServoEvent>) {
|
||||
match event {
|
||||
// App level events
|
||||
winit::event::Event::Suspended => {
|
||||
|
|
|
@ -28,7 +28,7 @@ struct Print {
|
|||
}
|
||||
|
||||
impl fmt::Debug for Print {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
// Safety: we’re in a signal handler that is about to call `libc::_exit`.
|
||||
// Potential data races from using `*_unsynchronized` functions are perhaps
|
||||
// less bad than potential deadlocks?
|
||||
|
@ -78,7 +78,7 @@ impl fmt::Debug for Print {
|
|||
}
|
||||
}
|
||||
|
||||
fn print_path(fmt: &mut fmt::Formatter, path: BytesOrWideString) -> fmt::Result {
|
||||
fn print_path(fmt: &mut fmt::Formatter<'_>, path: BytesOrWideString<'_>) -> fmt::Result {
|
||||
match path {
|
||||
BytesOrWideString::Bytes(mut bytes) => loop {
|
||||
match std::str::from_utf8(bytes) {
|
||||
|
|
|
@ -82,7 +82,7 @@ impl EventsLoop {
|
|||
|
||||
pub fn run_forever<F: 'static>(self, mut callback: F)
|
||||
where F: FnMut(
|
||||
winit::event::Event<ServoEvent>,
|
||||
winit::event::Event<'_, ServoEvent>,
|
||||
Option<&winit::event_loop::EventLoopWindowTarget<ServoEvent>>,
|
||||
&mut winit::event_loop::ControlFlow
|
||||
) {
|
||||
|
|
|
@ -394,7 +394,7 @@ impl WindowPortsMethods for Window {
|
|||
self.winit_window.id()
|
||||
}
|
||||
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::WindowEvent) {
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::WindowEvent<'_>) {
|
||||
match event {
|
||||
winit::event::WindowEvent::ReceivedCharacter(ch) => self.handle_received_character(ch),
|
||||
winit::event::WindowEvent::KeyboardInput { input, .. } => self.handle_keyboard_input(input),
|
||||
|
|
|
@ -98,7 +98,7 @@ impl WindowPortsMethods for Window {
|
|||
self.animation_state.get() == AnimationState::Animating
|
||||
}
|
||||
|
||||
fn winit_event_to_servo_event(&self, _event: winit::event::WindowEvent) {
|
||||
fn winit_event_to_servo_event(&self, _event: winit::event::WindowEvent<'_>) {
|
||||
// Not expecting any winit events.
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ pub trait WindowPortsMethods: WindowMethods {
|
|||
fn has_events(&self) -> bool;
|
||||
fn page_height(&self) -> f32;
|
||||
fn get_fullscreen(&self) -> bool;
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::WindowEvent);
|
||||
fn winit_event_to_servo_event(&self, event: winit::event::WindowEvent<'_>);
|
||||
fn is_animating(&self) -> bool;
|
||||
fn set_title(&self, _title: &str) {}
|
||||
fn set_inner_size(&self, _size: DeviceIntSize) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue