Skip to content

Commit 20de755

Browse files
gio/tests: Remove no longer useful guard
1 parent 4438f95 commit 20de755

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

gio/tests/std_io_copy.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1+
use gio::prelude::*;
2+
13
#[test]
2-
#[cfg(feature = "v2_36")]
34
fn std_io_copy_with_gio() {
4-
use gio::prelude::*;
5-
use std::io;
6-
75
let bytes = glib::Bytes::from_owned([1, 2, 3]);
8-
let mut read = gio::MemoryInputStream::new_from_bytes(&bytes).into_read();
6+
let mut read = gio::MemoryInputStream::from_bytes(&bytes).into_read();
97
let mut write = gio::MemoryOutputStream::new_resizable().into_write();
108

11-
let result = io::copy(&mut read, &mut write);
9+
let result = std::io::copy(&mut read, &mut write);
1210

1311
let out_stream = write.into_output_stream();
1412
out_stream.close(gio::Cancellable::NONE).unwrap();
1513
assert_eq!(result.unwrap(), 3);
16-
assert_eq!(out_stream.steal_as_bytes().unwrap(), bytes);
14+
assert_eq!(out_stream.steal_as_bytes(), bytes);
1715
}

0 commit comments

Comments
 (0)