Skip to content

Commit

Permalink
Remove double has_value check (#4040)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus authored Jul 1, 2024
1 parent 0041a40 commit 24c1f88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/std.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ struct formatter<std::expected<T, E>, Char,

if (value.has_value()) {
out = detail::write<Char>(out, "expected(");
out = detail::write_escaped_alternative<Char>(out, value.value());
out = detail::write_escaped_alternative<Char>(out, *value);
} else {
out = detail::write<Char>(out, "unexpected(");
out = detail::write_escaped_alternative<Char>(out, value.error());
Expand Down

0 comments on commit 24c1f88

Please sign in to comment.