From 9d3e0824a0966c648e951e5928c241700ee931fb Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Wed, 31 Mar 2021 13:19:55 -0600 Subject: "im not owned! im not owned!!", i continue to insist as i allocate and transform into a String https://twitter.com/dril_rs/status/1035032121860009984 --- src/makefile/pattern.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/makefile/pattern.rs') diff --git a/src/makefile/pattern.rs b/src/makefile/pattern.rs index fbd89a5..e4077cd 100644 --- a/src/makefile/pattern.rs +++ b/src/makefile/pattern.rs @@ -7,11 +7,11 @@ fn compile_pattern(pattern: &str) -> anyhow::Result { if let Some(real_result) = result.strip_suffix(r"\\\\") { // We end with two backslashes, so this is an escaped backslash and then an // unescaped wildcard. - result = real_result.to_string(); + result = real_result.to_owned(); result.push_str(r"\\(\w*)"); } else if let Some(real_result) = result.strip_suffix(r"\\") { // We end with one backslash, so this is an escaped wildcard. - result = real_result.to_string(); + result = real_result.to_owned(); result.push('%'); } else { // We don't end with a backslash, so this is an unescaped wildcard. -- cgit v1.2.3