Remove double has_value check (#4040)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov 2024-07-01 21:24:33 +05:00 committed by GitHub
parent 0041a40c13
commit 24c1f886af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());