Commit Graph

27 Commits

Author SHA1 Message Date
Pavel Grigorenko ed7cc3486c Implement VecDeque::pop_front_if & VecDeque::pop_back_if 2025-01-22 20:04:36 +03:00
Michael Goulet c682aa162b Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
Obei Sideg 3b0ce1bc33 Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
Ben Kimock ee05de8e5e Re-enable android tests/benches in alloc 2024-08-28 10:45:30 -04:00
Nicholas Nethercote 84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Kornel 78fb977d6b try_with_capacity for Vec, VecDeque, String
#91913
2024-03-01 18:24:02 +00:00
Markus Reiter a90cc05233 Replace NonZero::<_>::new with NonZero::new. 2024-02-15 08:09:42 +01:00
Markus Reiter 746a58d435 Use generic NonZero internally. 2024-02-15 08:09:42 +01:00
Pietro Albini 44556eed36 ignore core, alloc and test tests that require unwinding on panic=abort 2023-06-13 15:53:24 +02:00
The 8472 41807938d2 fix advance_by impl for vec_deque and add tests 2023-03-27 16:03:30 +02:00
pommicket 12f959ba39 Add test for VecDeque::append ZST capacity overflow 2023-02-25 13:50:56 -05:00
Scott McMurray 6648134434 Apply review feedback; Fix no_global_oom_handling build 2022-12-08 22:08:55 -08:00
Scott McMurray 58e60ac211 Make VecDeque::from_iter O(1) from vec(_deque)::IntoIter 2022-12-08 01:42:45 -08:00
Markus Everling a1bf25e2bd Update VecDeque implementation 2022-11-20 15:21:16 +01:00
Scott McMurray d62b903892 VecDeque::resize should re-use the buffer in the passed-in element
Today it always copies it for *every* appended element, but one of those clones is avoidable.
2022-11-15 00:53:26 -08:00
CAD97 7b58193f90 Adjust tests for isize::MAX allocation always being checked 2022-03-25 00:57:05 -05:00
T-O-R-U-S 72a25d05bf Use implicit capture syntax in format_args
This updates the standard library's documentation to use the new syntax. The
documentation is worthwhile to update as it should be more idiomatic
(particularly for features like this, which are nice for users to get acquainted
with). The general codebase is likely more hassle than benefit to update: it'll
hurt git blame, and generally updates can be done by folks updating the code if
(and when) that makes things more readable with the new format.

A few places in the compiler and library code are updated (mostly just due to
already having been done when this commit was first authored).
2022-03-10 10:23:40 -05:00
Lucas Kent 08829853d3 eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
Kornel 7dca8eb565 Use assert_matches! instead of if let {} else 2021-08-07 14:48:27 +01:00
Kornel a294aa8d3d Hide allocator details from TryReserveError 2021-07-24 22:25:08 +01:00
Vojtech Kral e68680d30d VecDeque: Add partition_point() #78021 2021-04-15 23:23:23 +02:00
Justus K d75618e7a2 replace assert! with assert_eq! 2020-12-13 10:21:24 +01:00
Justus K 0f30b7dd87 fix panic if converting ZST Vec to VecDeque 2020-12-13 10:02:36 +01:00
Alexis Bourget 85afbd8a15 Rebase conflicts 2020-10-17 18:47:58 +02:00
Vojtech Kral 36d9b72354 liballoc: VecDeque: Add binary search functions 2020-10-09 19:59:35 +02:00
Tomasz Miąsko f8cfb2f5ad Add tests for overflow in String / VecDeque operations using ranges 2020-09-04 00:00:00 +00:00
mark 2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00