Fix warnings

This commit is contained in:
Ivan Molodetskikh
2023-08-07 19:51:06 +04:00
parent a58e879bce
commit 7c8ea3fd70
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -24,11 +24,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut event_loop: EventLoop<CalloopData> = EventLoop::try_new()?; let mut event_loop: EventLoop<CalloopData> = EventLoop::try_new()?;
let mut display: Display<Smallvil> = Display::new()?; let mut display: Display<Smallvil> = Display::new()?;
let state = Smallvil::new(&mut event_loop, &mut display); let state = Smallvil::new(&event_loop, &mut display);
let mut data = CalloopData { state, display }; let mut data = CalloopData { state, display };
crate::winit::init_winit(&mut event_loop, &mut data)?; crate::winit::init_winit(&event_loop, &mut data)?;
let mut args = std::env::args().skip(1); let mut args = std::env::args().skip(1);
let flag = args.next(); let flag = args.next();
+2 -2
View File
@@ -39,7 +39,7 @@ pub struct Smallvil {
} }
impl Smallvil { impl Smallvil {
pub fn new(event_loop: &mut EventLoop<CalloopData>, display: &mut Display<Self>) -> Self { pub fn new(event_loop: &EventLoop<CalloopData>, display: &mut Display<Self>) -> Self {
let start_time = std::time::Instant::now(); let start_time = std::time::Instant::now();
let dh = display.handle(); let dh = display.handle();
@@ -94,7 +94,7 @@ impl Smallvil {
fn init_wayland_listener( fn init_wayland_listener(
display: &mut Display<Smallvil>, display: &mut Display<Smallvil>,
event_loop: &mut EventLoop<CalloopData>, event_loop: &EventLoop<CalloopData>,
) -> OsString { ) -> OsString {
// Creates a new listening socket, automatically choosing the next available `wayland` // Creates a new listening socket, automatically choosing the next available `wayland`
// socket name. // socket name.
+1 -1
View File
@@ -12,7 +12,7 @@ use smithay::utils::{Rectangle, Transform};
use crate::{CalloopData, Smallvil}; use crate::{CalloopData, Smallvil};
pub fn init_winit( pub fn init_winit(
event_loop: &mut EventLoop<CalloopData>, event_loop: &EventLoop<CalloopData>,
data: &mut CalloopData, data: &mut CalloopData,
) -> Result<(), Box<dyn std::error::Error>> { ) -> Result<(), Box<dyn std::error::Error>> {
let display = &mut data.display; let display = &mut data.display;