@@ -332,34 +332,32 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
332332 // https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2038
333333 protocol = url->get_protocol ().substr (0 , url->get_protocol ().size () - 1 );
334334 // Set username to url’s username.
335- username = std::move ( url->get_username () );
335+ username = url->get_username ();
336336 // Set password to url’s password.
337- password = std::move ( url->get_password () );
337+ password = url->get_password ();
338338 // Set hostname to url’s host, serialized, or the empty string if the value
339339 // is null.
340- hostname = std::move ( url->get_hostname () );
340+ hostname = url->get_hostname ();
341341 // Set port to url’s port, serialized, or the empty string if the value is
342342 // null.
343- port = std::move ( url->get_port () );
343+ port = url->get_port ();
344344 // Set pathname to the result of URL path serializing url.
345- pathname = std::move ( url->get_pathname () );
345+ pathname = url->get_pathname ();
346346 // Set search to url’s query or the empty string if the value is null.
347347 // IMPORTANT: Not documented on the URLPattern spec, but search prefix '?'
348348 // is removed. Similar work was done on workerd:
349349 // https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2232
350350 if (url->has_search ()) {
351351 auto view = url->get_search ();
352- search =
353- view.starts_with (" ?" ) ? url->get_search ().substr (1 ) : std::move (view);
352+ search = view.starts_with (" ?" ) ? url->get_search ().substr (1 ) : view;
354353 }
355354 // Set hash to url’s fragment or the empty string if the value is null.
356355 // IMPORTANT: Not documented on the URLPattern spec, but hash prefix '#' is
357356 // removed. Similar work was done on workerd:
358357 // https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2242
359358 if (url->has_hash ()) {
360359 auto view = url->get_hash ();
361- hash =
362- view.starts_with (" #" ) ? url->get_hash ().substr (1 ) : std::move (view);
360+ hash = view.starts_with (" #" ) ? url->get_hash ().substr (1 ) : view;
363361 }
364362 }
365363
0 commit comments