mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 23:07:46 +02:00
Remove some unnecessary static Vec
s (#11947)
Avoid unnecessary allocations or larger iterator structs - Turn static `Vec`s into arrays when possible - Use `std::iter::once`/`empty` where applicable - Use `bool::then_some` in `detect column` `.chain` - Drop in the bucket: de-vec-ing tests
This commit is contained in:
committed by
GitHub
parent
098527b263
commit
7884de1941
@ -46,7 +46,7 @@ pub(crate) fn generate_strftime_list(head: Span, show_parse_only_formats: bool)
|
||||
description: &'a str,
|
||||
}
|
||||
|
||||
let specifications = vec![
|
||||
let specifications = [
|
||||
FormatSpecification {
|
||||
spec: "%Y",
|
||||
description: "The full proleptic Gregorian year, zero-padded to 4 digits.",
|
||||
|
Reference in New Issue
Block a user