granite-rust/library/alloc/tests
bors 4f4dae055b Auto merge of #112387 - clarfonthey:non-panicking-ceil-char-boundary, r=m-ou-se
Don't panic in ceil_char_boundary

Implementing the alternative mentioned in this comment: https://github.com/rust-lang/rust/issues/93743#issuecomment-1579935853

Since `floor_char_boundary` will always work (rounding down to the length of the string is possible), it feels best for `ceil_char_boundary` to not panic either. However, the semantics of "rounding up" past the length of the string aren't very great, which is why the method originally panicked in these cases.

Taking into account how people are using this method, it feels best to simply return the end of the string in these cases, so that the result is still a valid char boundary.
2023-08-15 13:49:24 +00:00
..
arc.rs Remove Vec/Rc storage reuse opt 2022-11-18 10:39:50 +00:00
autotraits.rs s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList 2023-06-14 09:28:54 +02:00
borrow.rs Move various ui const tests to library 2020-09-04 02:35:27 +02:00
boxed.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
btree_set_hash.rs Include the length in BTree hashes 2021-10-01 12:29:09 -07:00
c_str.rs Remove use of reverted std::ffi::c_char 2022-04-27 14:01:04 -07:00
const_fns.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
cow_str.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fmt.rs enable fuzzy_provenance_casts lint in liballoc 2022-11-20 19:12:18 +01:00
heap.rs Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
lib.rs s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList 2023-06-14 09:28:54 +02:00
linked_list.rs Classify BinaryHeap & LinkedList unit tests as such 2022-03-11 11:33:59 +01:00
rc.rs Remove Vec/Rc storage reuse opt 2022-11-18 10:39:50 +00:00
slice.rs ignore core, alloc and test tests that require unwinding on panic=abort 2023-06-13 15:53:24 +02:00
str.rs Auto merge of #112387 - clarfonthey:non-panicking-ceil-char-boundary, r=m-ou-se 2023-08-15 13:49:24 +00:00
string.rs Improve test case for experimental API remove_matches in library/alloc/tests/string.rs 2023-07-26 17:54:48 -04:00
thin_box.rs Make use of pointer::is_aligned[_to] 2022-08-21 15:46:03 +04:00
vec.rs Auto merge of #113113 - Amanieu:box-vec-zst, r=Mark-Simulacrum 2023-07-14 01:59:08 +00:00
vec_deque.rs ignore core, alloc and test tests that require unwinding on panic=abort 2023-06-13 15:53:24 +02:00