File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ pub enum Error {
48
48
}
49
49
50
50
/// A parsed URL struct according to WHATWG URL specification.
51
- #[ derive( Eq ) ]
51
+ #[ derive( Eq , Clone ) ]
52
52
pub struct Url {
53
53
url : * mut ffi:: ada_url ,
54
54
}
@@ -416,6 +416,8 @@ impl<'de> serde::Deserialize<'de> for Url {
416
416
}
417
417
}
418
418
419
+ unsafe impl Send for Url { }
420
+
419
421
/// URLs compare like their stringification.
420
422
impl PartialEq for Url {
421
423
fn eq ( & self , other : & Self ) -> bool {
@@ -459,6 +461,12 @@ impl AsRef<[u8]> for Url {
459
461
}
460
462
}
461
463
464
+ impl Into < String > for Url {
465
+ fn into ( self ) -> String {
466
+ self . href ( ) . to_owned ( )
467
+ }
468
+ }
469
+
462
470
impl fmt:: Debug for Url {
463
471
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
464
472
unsafe {
You can’t perform that action at this time.
0 commit comments