Skip to content

Commit

Permalink
use to_string method
Browse files Browse the repository at this point in the history
  • Loading branch information
yggverse committed Dec 3, 2024
1 parent 3b9c1b1 commit d739181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/line/code/multiline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl Multiline {
return Some(Self {
alt: match alt.is_empty() {
true => None,
false => Some(String::from(alt)),
false => Some(alt.to_string()),
},
value: String::new(),
completed: false,
Expand Down
6 changes: 2 additions & 4 deletions src/line/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ impl Quote {
);

// Detect value
let value = regex.get(1)?.trim();
let value = regex.get(1)?.trim().to_string();

// Result
Some(Self {
value: String::from(value),
})
Some(Self { value })
}
}

0 comments on commit d739181

Please sign in to comment.