mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibDiff: Make Diff::from_text fallible
This commit is contained in:
committed by
Andreas Kling
parent
23df5748f6
commit
ee92378b80
@@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
|
||||
auto const color_output = TRY(Core::System::isatty(STDOUT_FILENO)) ? Diff::ColorOutput::Yes : Diff::ColorOutput::No;
|
||||
|
||||
auto hunks = Diff::from_text(TRY(file1->read_until_eof()), TRY(file2->read_until_eof()));
|
||||
auto hunks = TRY(Diff::from_text(TRY(file1->read_until_eof()), TRY(file2->read_until_eof())));
|
||||
for (auto const& hunk : hunks)
|
||||
TRY(Diff::write_normal(hunk, *out, color_output));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user