Skip to content

Commit

Permalink
fix: correct length addition and use Cow::to_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolv-Apneseth committed Nov 1, 2024
1 parent f162b17 commit befbc52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,8 @@ impl<'source> ResponseWithContext<'source> {

self.response.matches.append(&mut other.response.matches);

self.text = Cow::Owned(self.text.into_owned() + &other.text);
self.text_length = other.text_length;
self.text.to_mut().push_str(&other.text);
self.text_length += other.text_length;

self
}
Expand Down

0 comments on commit befbc52

Please sign in to comment.