Eliminate a temporary std::string in ParsedFailed helper.

Bug: None
Change-Id: If3435b5e9da9d2049c9b82b8b68e54d1ecc69003
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233440
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35125}
diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc
index d5fcddb..6def54a 100644
--- a/pc/webrtc_sdp.cc
+++ b/pc/webrtc_sdp.cc
@@ -415,7 +415,9 @@
   RTC_LOG(LS_ERROR) << "Failed to parse: \"" << first_line
                     << "\". Reason: " << description;
   if (error) {
-    error->line = std::string(first_line);
+    // TODO(bugs.webrtc.org/13220): In C++17, we can use plain assignment, with
+    // a string_view on the right hand side.
+    error->line.assign(first_line.data(), first_line.size());
     error->description = std::move(description);
   }
   return false;