From 0a879f7da48e9e6f8858f8638699f17d4b207a5a Mon Sep 17 00:00:00 2001 From: Tetsuharu Ohzeki Date: Sat, 10 Feb 2024 00:56:33 +0900 Subject: [PATCH] sourcegen: Fix warnings about clippy `str_to_string` rule --- crates/sourcegen/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sourcegen/src/lib.rs b/crates/sourcegen/src/lib.rs index ac3aa31b57..295b716b4e 100644 --- a/crates/sourcegen/src/lib.rs +++ b/crates/sourcegen/src/lib.rs @@ -69,7 +69,7 @@ impl CommentBlock { panic!("Use plain (non-doc) comments with tags like {tag}:\n {first}"); } - block.id = id.trim().to_string(); + block.id = id.trim().to_owned(); true }); blocks @@ -93,7 +93,7 @@ impl CommentBlock { if let Some(' ') = contents.chars().next() { contents = &contents[1..]; } - block.contents.push(contents.to_string()); + block.contents.push(contents.to_owned()); } None => { if !block.contents.is_empty() {