summaryrefslogtreecommitdiff
path: root/src/wat-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wat-parser.h')
-rw-r--r--src/wat-parser.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wat-parser.h b/src/wat-parser.h
index 4bb9b62c8..7f92de9e4 100644
--- a/src/wat-parser.h
+++ b/src/wat-parser.h
@@ -17,7 +17,6 @@
#ifndef wasm_wat_parser_h
#define wasm_wat_parser_h
-#include <optional>
#include <string_view>
#include "wasm.h"
@@ -37,7 +36,7 @@ template<typename T = Ok> struct Result {
Result(Result<T>& other) = default;
Result(const Err& e) : val(std::in_place_type<Err>, e) {}
- Result(Err&& e) : val(std::in_place_type<Err>, e) {}
+ Result(Err&& e) : val(std::in_place_type<Err>, std::move(e)) {}
template<typename U = T>
Result(U&& u) : val(std::in_place_type<T>, std::forward<U>(u)) {}