refactor: use extend instead of append
Co-authored-by: Jon Gjengset <jon@thesquareplanet.com>
This commit is contained in:
parent
74ef623fc5
commit
19af971c9a
1 changed files with 2 additions and 2 deletions
|
|
@ -110,8 +110,8 @@ impl<'a, T: Read + Write> AppendCmd<'a, T> {
|
|||
}
|
||||
|
||||
/// Append an array of flags
|
||||
pub fn flags(&mut self, flags: &'a [Flag<'a>]) -> &mut Self {
|
||||
self.flags.append(&mut flags.to_vec());
|
||||
pub fn flags(&mut self, flags: impl IntoIterator<Item = Flag<'a>>) -> &mut Self {
|
||||
self.flags.extend(flags);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue