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

Commit 60b82b3c authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

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

Bug: n/a
Test: builds
Change-Id: Ied7a0f529f0ddb7be180bbc7ffe41d022be42572
parent 2d649790
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());
}