@@ -332,34 +332,32 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
332
332
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2038
333
333
protocol = url->get_protocol ().substr (0 , url->get_protocol ().size () - 1 );
334
334
// Set username to url’s username.
335
- username = std::move ( url->get_username () );
335
+ username = url->get_username ();
336
336
// Set password to url’s password.
337
- password = std::move ( url->get_password () );
337
+ password = url->get_password ();
338
338
// Set hostname to url’s host, serialized, or the empty string if the value
339
339
// is null.
340
- hostname = std::move ( url->get_hostname () );
340
+ hostname = url->get_hostname ();
341
341
// Set port to url’s port, serialized, or the empty string if the value is
342
342
// null.
343
- port = std::move ( url->get_port () );
343
+ port = url->get_port ();
344
344
// Set pathname to the result of URL path serializing url.
345
- pathname = std::move ( url->get_pathname () );
345
+ pathname = url->get_pathname ();
346
346
// Set search to url’s query or the empty string if the value is null.
347
347
// IMPORTANT: Not documented on the URLPattern spec, but search prefix '?'
348
348
// is removed. Similar work was done on workerd:
349
349
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2232
350
350
if (url->has_search ()) {
351
351
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;
354
353
}
355
354
// Set hash to url’s fragment or the empty string if the value is null.
356
355
// IMPORTANT: Not documented on the URLPattern spec, but hash prefix '#' is
357
356
// removed. Similar work was done on workerd:
358
357
// https://github.com/cloudflare/workerd/blob/8620d14012513a6ce04d079e401d3becac3c67bd/src/workerd/jsg/url.c%2B%2B#L2242
359
358
if (url->has_hash ()) {
360
359
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;
363
361
}
364
362
}
365
363
0 commit comments