Skip to content

Commit 4af75eb

Browse files
committed
feat: add Sync trait for url
1 parent e5c33de commit 4af75eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,12 @@ impl<'de> serde::Deserialize<'de> for Url {
441441
}
442442
}
443443

444+
/// Send is required for sharing Url between threads safely
444445
unsafe impl Send for Url {}
445446

447+
/// Sync is required for sharing Url between threads safely
448+
unsafe impl Sync for Url {}
449+
446450
/// URLs compare like their stringification.
447451
impl PartialEq for Url {
448452
fn eq(&self, other: &Self) -> bool {

0 commit comments

Comments
 (0)