Skip to content

Commit c791cc3

Browse files
committed
use array instead of iter::once
1 parent 91e0f3a commit c791cc3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ use crate::parse::{ClangItemParser, ParseError};
7777
use crate::regex_set::RegexSet;
7878

7979
use std::borrow::Cow;
80+
use std::env;
8081
use std::fs::{File, OpenOptions};
8182
use std::io::{self, Write};
8283
use std::path::{Path, PathBuf};
8384
use std::process::{Command, Stdio};
84-
use std::{env, iter};
8585

8686
// Some convenient typedefs for a fast hash map and hash set.
8787
type HashMap<K, V> = ::rustc_hash::FxHashMap<K, V>;
@@ -1539,10 +1539,10 @@ impl Builder {
15391539
self.options.input_header = self.input_headers.pop();
15401540
self.options.extra_input_headers = self.input_headers;
15411541
self.options.clang_args.extend(
1542-
self.options.extra_input_headers.iter().flat_map(|header| {
1543-
iter::once("-include".into())
1544-
.chain(iter::once(header.to_string()))
1545-
}),
1542+
self.options
1543+
.extra_input_headers
1544+
.iter()
1545+
.flat_map(|header| ["-include".into(), header.to_string()]),
15461546
);
15471547

15481548
self.state.input_unsaved_files.extend(

0 commit comments

Comments
 (0)