1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

printf: refactor ~ remove redundant string allocation

This commit is contained in:
Roy Ivy III 2020-04-04 10:46:08 -05:00
parent 3e3dff3a57
commit d704fb2b61

View file

@ -72,7 +72,7 @@ impl Memo {
}
pub fn run_all(pf_string: &str, pf_args: &[String]) {
let mut arg_it = pf_args.iter().peekable();
let pm = Memo::new(&pf_string.to_string(), &mut arg_it);
let pm = Memo::new(pf_string, &mut arg_it);
loop {
if arg_it.peek().is_none() {
break;