Remove rtc::Optional::MoveValue

This function is not present in std::optional
The only use of MoveValue doesn't need move since
copying underneath struct is as correct and as fast as moving

Bug: webrtc:9078
Change-Id: Ic0c87e50ffd8f6c024759b14ceeb8922b5d3a6fd
Reviewed-on: https://webrtc-review.googlesource.com/64986
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22646}
diff --git a/api/optional.h b/api/optional.h
index 7a62335..9221f2c 100644
--- a/api/optional.h
+++ b/api/optional.h
@@ -281,12 +281,6 @@
                       : default_val;
   }
 
-  // Dereference and move value.
-  T MoveValue() {
-    RTC_DCHECK(has_value_);
-    return std::move(value_);
-  }
-
   // Equality tests. Two Optionals are equal if they contain equivalent values,
   // or if they're both empty.
   friend bool operator==(const Optional& m1, const Optional& m2) {
diff --git a/api/optional_unittest.cc b/api/optional_unittest.cc
index 2149033..ad700dc 100644
--- a/api/optional_unittest.cc
+++ b/api/optional_unittest.cc
@@ -861,7 +861,7 @@
   {
     Optional<Logger> x(Logger(42));
     log->push_back("---");
-    Logger moved = x.MoveValue();
+    Logger moved = std::move(x.value());
     log->push_back("---");
   }
   EXPECT_EQ(