Skip to content

Commit 847a564

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 ba78881 commit 847a564

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::{PipeWriter, Write};
44
use std::os::fd::{AsFd, BorrowedFd, OwnedFd};
55
use std::os::unix::net::UnixStream;
66
use std::sync::{Arc, Mutex, OnceLock};
@@ -1026,7 +1026,7 @@ impl Dispatch<WlDataOffer, Vec<PasteData>> for State {
10261026
.position(|data| data.mime_type == mime_type)
10271027
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
10281028

1029-
let mut stream = UnixStream::from(fd);
1029+
let mut stream = PipeWriter::from(fd);
10301030
stream.write_all(&data[pos].data).unwrap();
10311031
}
10321032
wl_data_offer::Request::Destroy => {}

0 commit comments

Comments
 (0)