diff --git a/qemu-display/examples/win32-test.rs b/qemu-display/examples/win32-test.rs index c96f6b2..5084653 100644 --- a/qemu-display/examples/win32-test.rs +++ b/qemu-display/examples/win32-test.rs @@ -1,7 +1,4 @@ -use std::env::args; -use std::error::Error; -use std::thread::sleep; -use std::time::Duration; +use std::{env::args, error::Error, thread::sleep, time::Duration}; use qemu_display::Display; diff --git a/qemu-display/src/audio.rs b/qemu-display/src/audio.rs index 2cd51de..c6912a8 100644 --- a/qemu-display/src/audio.rs +++ b/qemu-display/src/audio.rs @@ -8,8 +8,7 @@ use uds_windows::UnixStream; use zbus::zvariant::Fd; use zbus::{dbus_interface, dbus_proxy, Connection}; -use crate::util; -use crate::Result; +use crate::{util, Result}; #[derive(Debug)] pub struct PCMInfo { diff --git a/qemu-display/src/win32.rs b/qemu-display/src/win32.rs index 3d0f70d..d0ce256 100644 --- a/qemu-display/src/win32.rs +++ b/qemu-display/src/win32.rs @@ -1,7 +1,9 @@ use std::io; -use windows::Win32::Foundation::{CloseHandle, HANDLE}; -use windows::Win32::Networking::WinSock::{WSADuplicateSocketW, SOCKET, WSAPROTOCOL_INFOW}; -use windows::Win32::System::Threading::PROCESS_ACCESS_RIGHTS; +use windows::Win32::{ + Foundation::{CloseHandle, HANDLE}, + Networking::WinSock::{WSADuplicateSocketW, SOCKET, WSAPROTOCOL_INFOW}, + System::Threading::PROCESS_ACCESS_RIGHTS, +}; #[cfg(feature = "qmp")] use uds_windows::UnixStream; @@ -52,8 +54,7 @@ impl ProcessHandle { } pub fn process_id(&self) -> crate::Result { - use windows::Win32::Foundation::GetLastError; - use windows::Win32::System::Threading::GetProcessId; + use windows::Win32::{Foundation::GetLastError, System::Threading::GetProcessId}; unsafe { let pid = GetProcessId(self.0); diff --git a/qemu-rdw/src/display.rs b/qemu-rdw/src/display.rs index 60a3d61..d38ec6b 100644 --- a/qemu-rdw/src/display.rs +++ b/qemu-rdw/src/display.rs @@ -313,14 +313,14 @@ glib::wrapper! { impl Display { pub fn new(console: Console) -> Self { - let obj = glib::Object::new(&[]); - let self_ = imp::Display::from_instance(&obj); + let obj = glib::Object::builder().build(); + let self_ = imp::Display::from_obj(&obj); self_.console.set(console).unwrap(); obj } pub(crate) fn console(&self) -> &Console { - let self_ = imp::Display::from_instance(self); + let self_ = imp::Display::from_obj(self); self_.console.get().unwrap() } } diff --git a/qemu-rdw/src/main.rs b/qemu-rdw/src/main.rs index 80dbe23..68633eb 100644 --- a/qemu-rdw/src/main.rs +++ b/qemu-rdw/src/main.rs @@ -306,7 +306,7 @@ impl App { self.inner.clipboard.replace(Some(cb)); } - fn run(&self) -> i32 { + fn run(&self) -> glib::ExitCode { self.inner.app.run() } } diff --git a/qemu-vte/Cargo.toml b/qemu-vte/Cargo.toml index f92bca1..7aba51e 100644 --- a/qemu-vte/Cargo.toml +++ b/qemu-vte/Cargo.toml @@ -13,4 +13,4 @@ futures = "0.3.13" [dependencies.vte] package = "vte4" -version = "0.5" +version = "0.6"