From d704fb2b613fefa33c8bf3d7bc04d355994e9f7b Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sat, 4 Apr 2020 10:46:08 -0500 Subject: [PATCH] printf: refactor ~ remove redundant string allocation --- src/printf/memo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/printf/memo.rs b/src/printf/memo.rs index 4d26efc15..5f3eee482 100644 --- a/src/printf/memo.rs +++ b/src/printf/memo.rs @@ -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;