From 0a42a540c603846aa22f29f378a61a64c9d4383e Mon Sep 17 00:00:00 2001 From: BenoƮt du Garreau Date: Wed, 7 Feb 2024 16:21:16 +0100 Subject: Make `io::BorrowedCursor::advance` safe This also keeps the old `advance` method under `advance_unchecked` name. This makes pattern like `std::io::default_read_buf` safe to write. --- library/std/src/io/tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/std/src/io/tests.rs') diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs index 33e9d8efed5..fd7e51688cd 100644 --- a/library/std/src/io/tests.rs +++ b/library/std/src/io/tests.rs @@ -655,7 +655,7 @@ fn bench_take_read_buf(b: &mut test::Bencher) { // Issue #120603 #[test] -#[should_panic = "read should not return more bytes than there is capacity for in the read buffer"] +#[should_panic] fn read_buf_broken_read() { struct MalformedRead; -- cgit 1.4.1-3-g733a5