mirror of
https://github.com/YaLTeR/wl-clipboard-rs.git
synced 2025-10-05 16:22:48 +02:00
Allow windows-sys 0.60
This commit is contained in:
committed by
Ivan Molodetskikh
parent
e551d8ed97
commit
32efe71bbd
493
Cargo.lock
generated
493
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ keywords = ["wayland", "clipboard"]
|
||||
[workspace.dependencies]
|
||||
libc = "0.2.170"
|
||||
log = "0.4.26"
|
||||
rustix = "0.38.44"
|
||||
rustix = "1.0.8"
|
||||
|
||||
[package]
|
||||
name = "wl-clipboard-rs"
|
||||
@@ -33,7 +33,7 @@ libc.workspace = true
|
||||
log.workspace = true
|
||||
os_pipe = { version = "1.2.1", features = ["io_safety"] }
|
||||
rustix = { workspace = true, features = ["fs", "event"] }
|
||||
tempfile = "3.17.1"
|
||||
tempfile = "3.21.0"
|
||||
thiserror = "2"
|
||||
tree_magic_mini = "3.1.6"
|
||||
wayland-backend = "0.3.8"
|
||||
@@ -45,8 +45,8 @@ wayland-protocols-wlr = { version = "0.3.6", features = ["client"] }
|
||||
wayland-server = "0.31.7"
|
||||
wayland-protocols = { version = "0.32.6", features = ["server", "staging"] }
|
||||
wayland-protocols-wlr = { version = "0.3.6", features = ["server"] }
|
||||
proptest = "1.6.0"
|
||||
proptest-derive = "0.5.1"
|
||||
proptest = "1.7.0"
|
||||
proptest-derive = "0.6.0"
|
||||
|
||||
[features]
|
||||
# Link to libwayland-client.so instead of using the Rust implementation.
|
||||
|
@@ -565,7 +565,7 @@ fn make_source(
|
||||
trim_newline: bool,
|
||||
) -> Result<(String, PathBuf), SourceCreationError> {
|
||||
let temp_dir = tempfile::tempdir().map_err(SourceCreationError::TempDirCreate)?;
|
||||
let mut temp_filename = temp_dir.into_path();
|
||||
let mut temp_filename = temp_dir.keep();
|
||||
temp_filename.push("stdin");
|
||||
trace!("Temp filename: {}", temp_filename.to_string_lossy());
|
||||
let mut temp_file =
|
||||
@@ -583,8 +583,7 @@ fn make_source(
|
||||
let mime_type = match mime_type {
|
||||
MimeType::Autodetect => match tree_magic_mini::from_filepath(&temp_filename) {
|
||||
Some(magic) => Ok(magic),
|
||||
None => Err(SourceCreationError::TempFileOpen(std::io::Error::new(
|
||||
std::io::ErrorKind::Other,
|
||||
None => Err(SourceCreationError::TempFileOpen(std::io::Error::other(
|
||||
"problem with temp file",
|
||||
))),
|
||||
}?
|
||||
|
@@ -5,6 +5,7 @@ use std::sync::atomic::Ordering::SeqCst;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
||||
use rustix::buffer::spare_capacity;
|
||||
use rustix::event::epoll;
|
||||
use wayland_backend::server::ClientData;
|
||||
use wayland_server::{Display, ListeningSocket};
|
||||
@@ -82,10 +83,10 @@ impl<S: Send + 'static> TestServer<S> {
|
||||
|
||||
while client_counter.0.load(SeqCst) > 0 || waiting_for_first_client {
|
||||
// Wait for requests from the client.
|
||||
let mut events = epoll::EventVec::with_capacity(2);
|
||||
epoll::wait(&self.epoll, &mut events, -1).unwrap();
|
||||
let mut events = Vec::with_capacity(2);
|
||||
epoll::wait(&self.epoll, spare_capacity(&mut events), None).unwrap();
|
||||
|
||||
for event in &events {
|
||||
for event in events.drain(..) {
|
||||
match event.data.u64() {
|
||||
0 => {
|
||||
// Try to accept a new client.
|
||||
|
Reference in New Issue
Block a user