Skip to content

Commit

Permalink
Favor vec![] over Vec::new
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Dec 5, 2023
1 parent 0a65263 commit 0e73c26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/demangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn create_disambiguator_re() -> Regex {

fn demangle_lines(lines: Lines<'_>) -> Vec<String> {
let strip_crate_disambiguators = create_disambiguator_re();
let mut demangled_lines = Vec::new();
let mut demangled_lines = vec![];
for mangled in lines {
let mut demangled = demangle(mangled).to_string();
demangled = strip_crate_disambiguators.replace_all(&demangled, REPLACE_COLONS).to_string();
Expand Down
2 changes: 1 addition & 1 deletion src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl ProcessBuilder {
pub(crate) fn new(program: impl Into<OsString>) -> Self {
let mut this = Self {
program: program.into(),
args: Vec::new(),
args: vec![],
env: BTreeMap::new(),
dir: None,
stdout_to_stderr: false,
Expand Down

0 comments on commit 0e73c26

Please sign in to comment.