refactor: remove redundant to_owned
This commit is contained in:
@@ -57,10 +57,8 @@ fn get_todos(path: &str, todos: &mut Vec<String>) -> Result<(), std::io::Error>
|
|||||||
for line in contents.lines() {
|
for line in contents.lines() {
|
||||||
if line.contains("TODO") {
|
if line.contains("TODO") {
|
||||||
let (_, comment) = line.split_once("TODO").unwrap();
|
let (_, comment) = line.split_once("TODO").unwrap();
|
||||||
let cleaned_comment = comment.replace(":", "")
|
let cleaned_comment = comment.replace(":", "").trim().to_owned();
|
||||||
.trim()
|
todos.push(cleaned_comment)
|
||||||
.to_owned();
|
|
||||||
todos.push(cleaned_comment.to_owned())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user