Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions corcovado/src/sys/windows/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ impl TcpStream {
}
}

fn inner(&self) -> MutexGuard<StreamInner> {
fn inner(&self) -> MutexGuard<'_, StreamInner> {
self.imp.inner()
}

#[allow(unused)]
fn before_read(&self) -> io::Result<MutexGuard<StreamInner>> {
fn before_read(&self) -> io::Result<MutexGuard<'_, StreamInner>> {
let mut me = self.inner();

match me.read {
Expand Down Expand Up @@ -425,7 +425,7 @@ impl TcpStream {
}

impl StreamImp {
fn inner(&self) -> MutexGuard<StreamInner> {
fn inner(&self) -> MutexGuard<'_, StreamInner> {
self.inner.inner.lock().unwrap()
}

Expand Down Expand Up @@ -803,13 +803,13 @@ impl TcpListener {
self.imp.inner.socket.take_error()
}

fn inner(&self) -> MutexGuard<ListenerInner> {
fn inner(&self) -> MutexGuard<'_, ListenerInner> {
self.imp.inner()
}
}

impl ListenerImp {
fn inner(&self) -> MutexGuard<ListenerInner> {
fn inner(&self) -> MutexGuard<'_, ListenerInner> {
self.inner.inner.lock().unwrap()
}

Expand Down
9 changes: 3 additions & 6 deletions corcovado/src/sys/windows/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ impl UdpSocket {
}
Ok((data.len(), addr))
} else {
Err(io::Error::new(
io::ErrorKind::Other,
"failed to parse socket address",
))
Err(io::Error::other("failed to parse socket address"))
};
me.iocp.put_buffer(data);
self.imp.schedule_read_from(&mut me);
Expand Down Expand Up @@ -303,7 +300,7 @@ impl UdpSocket {
self.imp.inner.socket.take_error()
}

fn inner(&self) -> MutexGuard<Inner> {
fn inner(&self) -> MutexGuard<'_, Inner> {
self.imp.inner()
}

Expand All @@ -324,7 +321,7 @@ impl UdpSocket {
}

impl Imp {
fn inner(&self) -> MutexGuard<Inner> {
fn inner(&self) -> MutexGuard<'_, Inner> {
self.inner.inner.lock().unwrap()
}

Expand Down
1 change: 1 addition & 0 deletions frontends/rioterm/src/context/title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ impl ContextManagerTitles {
}
}

#[cfg_attr(not(unix), allow(unused_variables))]
pub fn create_title_extra_from_context<T: rio_backend::event::EventListener>(
context: &Context<T>,
) -> Option<ContextTitleExtra> {
Expand Down
3 changes: 2 additions & 1 deletion rio-window/src/platform_impl/windows/dark_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{ffi::c_void, ptr};

use crate::utils::Lazy;
use windows_sys::core::PCSTR;
use windows_sys::s;
use windows_sys::Win32::Foundation::{BOOL, HWND, NTSTATUS, S_OK};
use windows_sys::Win32::System::LibraryLoader::{GetProcAddress, LoadLibraryA};
use windows_sys::Win32::System::SystemInformation::OSVERSIONINFOW;
Expand Down Expand Up @@ -146,7 +147,7 @@ fn should_apps_use_dark_mode() -> bool {
return None;
}

let module = LoadLibraryA("uxtheme.dll\0".as_ptr());
let module = LoadLibraryA(s!("uxtheme.dll"));

if module.is_null() {
return None;
Expand Down
2 changes: 1 addition & 1 deletion rio-window/src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ fn dur2timeout(dur: Duration) -> u32 {
.checked_mul(1000)
.and_then(|ms| ms.checked_add((dur.subsec_nanos() as u64) / 1_000_000))
.and_then(|ms| {
if dur.subsec_nanos() % 1_000_000 > 0 {
if !dur.subsec_nanos().is_multiple_of(1_000_000) {
ms.checked_add(1)
} else {
Some(ms)
Expand Down
2 changes: 2 additions & 0 deletions rio-window/src/platform_impl/windows/util.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(non_snake_case)]

use std::ffi::{c_void, OsStr, OsString};
use std::iter::once;
use std::ops::BitAnd;
Expand Down
54 changes: 0 additions & 54 deletions sugarloaf/src/components/filters/runtime/buffer.rs

This file was deleted.

75 changes: 0 additions & 75 deletions sugarloaf/src/components/filters/runtime/draw_quad.rs

This file was deleted.

43 changes: 0 additions & 43 deletions sugarloaf/src/components/filters/runtime/error.rs

This file was deleted.

Loading
Loading