mirror of
https://github.com/YaLTeR/wl-clipboard-rs.git
synced 2025-10-06 00:32:41 +02:00
Update dependencies
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- Added `copy::Options::omit_additional_text_mime_types` to disable wl-
|
||||
clipboard-rs offering several known text MIME types when a text MIME type is
|
||||
copied.
|
||||
- Updated `wayland-rs` to 0.30.
|
||||
- Updated `wayland-rs` to 0.31.
|
||||
- **Breaking** This changed the error types slightly. However, most uses of
|
||||
wl-clipboard-rs should be completely unaffected.
|
||||
- Updated other dependencies.
|
||||
|
28
Cargo.toml
28
Cargo.toml
@@ -17,24 +17,24 @@ members = [".", "wl-clipboard-rs-tools"]
|
||||
|
||||
[dependencies]
|
||||
derive-new = "0.5.9"
|
||||
libc = "0.2.146"
|
||||
log = "0.4.19"
|
||||
nix = "0.26.2"
|
||||
os_pipe = "1.1.4"
|
||||
tempfile = "3.6.0"
|
||||
libc = "0.2.148"
|
||||
log = "0.4.20"
|
||||
nix = "0.26.4"
|
||||
os_pipe = { version = "1.1.4", features = ["io_safety"] }
|
||||
tempfile = "3.8.0"
|
||||
thiserror = "1"
|
||||
tree_magic_mini = "3.0.3"
|
||||
wayland-backend = "0.1.2"
|
||||
wayland-client = "0.30.2"
|
||||
wayland-protocols = { version = "0.30.0", features = ["client"] }
|
||||
wayland-protocols-wlr = { version = "0.1.0", features = ["client"] }
|
||||
wayland-backend = "0.3.2"
|
||||
wayland-client = "0.31.1"
|
||||
wayland-protocols = { version = "0.31.0", features = ["client"] }
|
||||
wayland-protocols-wlr = { version = "0.2.0", features = ["client"] }
|
||||
|
||||
[dev-dependencies]
|
||||
wayland-server = "0.30.1"
|
||||
wayland-protocols = { version = "0.30.0", features = ["server"] }
|
||||
wayland-protocols-wlr = { version = "0.1.0", features = ["server"] }
|
||||
proptest = "1.2.0"
|
||||
proptest-derive = "0.3.0"
|
||||
wayland-server = "0.31.0"
|
||||
wayland-protocols = { version = "0.31.0", features = ["server"] }
|
||||
wayland-protocols-wlr = { version = "0.2.0", features = ["server"] }
|
||||
proptest = "1.3.1"
|
||||
proptest-derive = "0.4.0"
|
||||
|
||||
[features]
|
||||
# Link to libwayland-client.so instead of using the Rust implementation.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::ffi::OsString;
|
||||
use std::io;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::os::fd::AsFd;
|
||||
|
||||
use os_pipe::{pipe, PipeReader};
|
||||
use wayland_client::globals::GlobalListContents;
|
||||
@@ -407,7 +407,7 @@ pub(crate) fn get_contents_internal(
|
||||
let (read, write) = pipe().map_err(Error::PipeCreation)?;
|
||||
|
||||
// Start the transfer.
|
||||
offer.receive(mime_type.clone(), write.as_raw_fd());
|
||||
offer.receive(mime_type.clone(), write.as_fd());
|
||||
drop(write);
|
||||
|
||||
// A flush() is not enough here, it will result in sometimes pasting empty contents. I suspect this is due to a
|
||||
|
@@ -1,5 +1,5 @@
|
||||
use std::ffi::OsStr;
|
||||
use std::os::fd::{AsRawFd, FromRawFd};
|
||||
use std::os::fd::{AsRawFd, FromRawFd, OwnedFd};
|
||||
use std::sync::atomic::AtomicU8;
|
||||
use std::sync::atomic::Ordering::SeqCst;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -8,7 +8,6 @@ use std::thread;
|
||||
use nix::sys::epoll::{
|
||||
epoll_create1, epoll_ctl, epoll_wait, EpollCreateFlags, EpollEvent, EpollFlags, EpollOp,
|
||||
};
|
||||
use wayland_backend::io_lifetimes::OwnedFd;
|
||||
use wayland_backend::server::ClientData;
|
||||
use wayland_server::{Display, ListeningSocket};
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::io::Write;
|
||||
use std::os::fd::{AsRawFd, FromRawFd, IntoRawFd};
|
||||
use std::os::fd::{AsFd, AsRawFd};
|
||||
use std::sync::atomic::AtomicU8;
|
||||
use std::sync::atomic::Ordering::SeqCst;
|
||||
use std::sync::mpsc::Sender;
|
||||
@@ -256,7 +256,7 @@ impl Dispatch<ZwlrDataControlOfferV1, (String, bool)> for State {
|
||||
|
||||
match offer_info {
|
||||
OfferInfo::Buffered { data } => {
|
||||
let mut write = unsafe { PipeWriter::from_raw_fd(fd.into_raw_fd()) };
|
||||
let mut write = PipeWriter::from(fd);
|
||||
let _ = write.write_all(&data[mime_type.as_str()]);
|
||||
}
|
||||
OfferInfo::Runtime { source } => {
|
||||
@@ -264,7 +264,7 @@ impl Dispatch<ZwlrDataControlOfferV1, (String, bool)> for State {
|
||||
fcntl(fd.as_raw_fd(), FcntlArg::F_SETFL(OFlag::O_NONBLOCK)).unwrap();
|
||||
}
|
||||
|
||||
source.send(mime_type, fd.as_raw_fd())
|
||||
source.send(mime_type, fd.as_fd())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -14,11 +14,11 @@ categories = ["command-line-utilities"]
|
||||
|
||||
[dependencies]
|
||||
wl-clipboard-rs = { path = "../", version = "0.8.0" }
|
||||
anyhow = "1.0.71"
|
||||
libc = "0.2.146"
|
||||
log = "0.4.19"
|
||||
anyhow = "1.0.75"
|
||||
libc = "0.2.148"
|
||||
log = "0.4.20"
|
||||
mime_guess = "2.0.4"
|
||||
nix = "0.26.2"
|
||||
nix = "0.26.4"
|
||||
stderrlog = "0.5.4"
|
||||
structopt = { version = "0.3.26", features = ["wrap_help"] }
|
||||
|
||||
|
@@ -61,7 +61,7 @@ struct Options {
|
||||
}
|
||||
|
||||
fn infer_mime_type() -> Option<Mime> {
|
||||
if let Ok(stdout_path) = read_link(&format!("/dev/fd/{}", STDOUT_FILENO)) {
|
||||
if let Ok(stdout_path) = read_link(format!("/dev/fd/{}", STDOUT_FILENO)) {
|
||||
mime_guess::from_path(stdout_path).first()
|
||||
} else {
|
||||
None
|
||||
|
Reference in New Issue
Block a user