No need for single-element vec for chaining one element
This commit is contained in:
parent
6a9a21f178
commit
015e39776f
@ -14,6 +14,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
|||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::ffi::{CStr, CString, OsString};
|
use std::ffi::{CStr, CString, OsString};
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
use std::iter;
|
||||||
use std::net;
|
use std::net;
|
||||||
use std::num::{
|
use std::num::{
|
||||||
NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, NonZeroU128,
|
NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, NonZeroU128,
|
||||||
@ -199,7 +200,7 @@ fn assert_de_tokens_ignore(ignorable_tokens: &[Token]) {
|
|||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.chain(ignorable_tokens.iter().copied())
|
.chain(ignorable_tokens.iter().copied())
|
||||||
.chain(vec![Token::MapEnd])
|
.chain(iter::once(Token::MapEnd))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let expected = IgnoreBase { a: 1 };
|
let expected = IgnoreBase { a: 1 };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user