diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-01-11 19:42:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-11 19:42:53 +0100 |
| commit | b3d15ebb08ddeecbdcb92e5f2121975a54b901ad (patch) | |
| tree | 192890a5c94360e91ab02d2cd87b7b4d4c2db227 /library/alloc | |
| parent | ca17ce4558858baa439922376a947be273de7df8 (diff) | |
| parent | aa696c5a228a2c9730227eb5a0e99fb9d85eb61d (diff) | |
| download | rust-b3d15ebb08ddeecbdcb92e5f2121975a54b901ad.tar.gz rust-b3d15ebb08ddeecbdcb92e5f2121975a54b901ad.zip | |
Rollup merge of #119853 - klensy:rustfmt-ignore, r=cuviper
rustfmt.toml: don't ignore just any tests path, only root one Previously ignored any `tests` path, now only /tests at repo root. For reference, https://git-scm.com/docs/gitignore#_pattern_format
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/tests/autotraits.rs | 7 | ||||
| -rw-r--r-- | library/alloc/tests/vec.rs | 10 |
2 files changed, 4 insertions, 13 deletions
diff --git a/library/alloc/tests/autotraits.rs b/library/alloc/tests/autotraits.rs index ba5e28f7293..6b82deeac8a 100644 --- a/library/alloc/tests/autotraits.rs +++ b/library/alloc/tests/autotraits.rs @@ -55,12 +55,7 @@ fn test_btree_map() { require_send_sync(async { let _v = None::< - alloc::collections::btree_map::ExtractIf< - '_, - &u32, - &u32, - fn(&&u32, &mut &u32) -> bool, - >, + alloc::collections::btree_map::ExtractIf<'_, &u32, &u32, fn(&&u32, &mut &u32) -> bool>, >; async {}.await; }); diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs index 9ec6f6ae1ac..0f5e0d99eca 100644 --- a/library/alloc/tests/vec.rs +++ b/library/alloc/tests/vec.rs @@ -1,7 +1,7 @@ use core::alloc::{Allocator, Layout}; -use core::{assert_eq, assert_ne}; use core::num::NonZeroUsize; use core::ptr::NonNull; +use core::{assert_eq, assert_ne}; use std::alloc::System; use std::assert_matches::assert_matches; use std::borrow::Cow; @@ -1212,7 +1212,7 @@ fn test_in_place_specialization_step_up_down() { assert_eq!(sink.len(), 2); let mut src: Vec<[u8; 3]> = Vec::with_capacity(17); - src.resize( 8, [0; 3]); + src.resize(8, [0; 3]); let iter = src.into_iter().map(|[a, b, _]| [a, b]); assert_in_place_trait(&iter); let sink: Vec<[u8; 2]> = iter.collect(); @@ -1221,11 +1221,7 @@ fn test_in_place_specialization_step_up_down() { let src = vec![[0u8; 4]; 256]; let srcptr = src.as_ptr(); - let iter = src - .into_iter() - .flat_map(|a| { - a.into_iter().map(|b| b.wrapping_add(1)) - }); + let iter = src.into_iter().flat_map(|a| a.into_iter().map(|b| b.wrapping_add(1))); assert_in_place_trait(&iter); let sink = iter.collect::<Vec<_>>(); assert_eq!(srcptr as *const u8, sink.as_ptr()); |
