willothy / worth

Empty call to new() RS-W1079
Anti-pattern
Minor
a year agoa year old
Empty call to new()
183
184fn collect_macros(program: &mut Program) -> Result<()> {
185    let mut macro_body = Vec::new();
186    let mut macro_name = String::new();187    let mut macro_stack = Vec::new();
188    let mut in_macro = false;
189
Empty call to new()
692            println!("Location: {}", err_loc(&inst.loc));
693            println!("Stack: {:?}", stack);
694            println!("Snapshots: {}\n", snapshots.len());
695            std::io::stdin().read_line(&mut String::new()).unwrap();696        }
697
698        ip += 1;
Empty call to new()
382
383            fmt_tokens.push(FmtToken {
384                indent_level: 0,
385                prefix: String::new(),386                color: String::new(),
387                value: token_str.clone(),
388                postcolor: String::new(),
Empty call to new()
385                prefix: String::new(),
386                color: String::new(),
387                value: token_str.clone(),
388                postcolor: String::new(),389                postfix: String::new(),
390                loc: &token.loc,
391                kind: FmtTokenKind::Instruction(token.kind.clone()),
Empty call to new()
386                color: String::new(),
387                value: token_str.clone(),
388                postcolor: String::new(),
389                postfix: String::new(),390                loc: &token.loc,
391                kind: FmtTokenKind::Instruction(token.kind.clone()),
392            });