Skip to content

Commit 519c727

Browse files
committed
Fix copy_from_wayland breaking on Nightly
Issue where changed: rust-lang/rust#139956 Comment noting breakage of non-socket converted to UnixStream: 'rust-lang/rust#140005 (comment)' I think this bumps MSRV for testwl from 1.83.0 to 1.87.0, but testwl doesn't pass `cargo check`, not sure why, not sure how integrations still work, but whatever.
1 parent 557ebeb commit 519c727

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testwl/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::{hash_map, HashMap, HashSet};
22
use std::io::Read;
3-
use std::io::Write;
3+
use std::io::{Write, PipeWriter};
44
use std::os::fd::{AsFd, BorrowedFd, OwnedFd};
55
use std::os::unix::net::UnixStream;
66
use std::sync::{Arc, Mutex, OnceLock};
@@ -997,7 +997,7 @@ impl Dispatch<WlDataOffer, Vec<PasteData>> for State {
997997
.position(|data| data.mime_type == mime_type)
998998
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
999999

1000-
let mut stream = UnixStream::from(fd);
1000+
let mut stream = PipeWriter::from(fd);
10011001
stream.write_all(&data[pos].data).unwrap();
10021002
}
10031003
wl_data_offer::Request::Destroy => {}

0 commit comments

Comments
 (0)