mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibDiff: Port Diff::Hunk from DeprecatedString to String
Removing the last instance of DeprecatedString in this library! :^)
This commit is contained in:
parent
9dc92f19b8
commit
d3a27eeaf2
3 changed files with 7 additions and 7 deletions
|
@ -72,9 +72,9 @@ ErrorOr<Vector<Hunk>> from_text(StringView old_text, StringView new_text)
|
|||
cur_hunk = { i, j, {}, {} };
|
||||
}
|
||||
if (direction == Direction::Down) {
|
||||
TRY(cur_hunk.added_lines.try_append(new_lines[j]));
|
||||
TRY(cur_hunk.added_lines.try_append(TRY(String::from_utf8(new_lines[j]))));
|
||||
} else if (direction == Direction::Right) {
|
||||
TRY(cur_hunk.removed_lines.try_append(old_lines[i]));
|
||||
TRY(cur_hunk.removed_lines.try_append(TRY(String::from_utf8(old_lines[i]))));
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue