Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9b7bb0d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[nit] Don't copy expected<> object in a query"

parents b75566ae 60b82b3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ using NullOrIOError = std::variant<std::nullopt_t, IOError>;

// Checks whether the result holds an unexpected I/O error.
template <typename T>
static inline bool IsIOError(const base::expected<T, NullOrIOError> result) {
static inline bool IsIOError(const base::expected<T, NullOrIOError>& result) {
  return !result.has_value() && std::holds_alternative<IOError>(result.error());
}