Skip to content

Commit a01aea3

Browse files
committed
refactor: remove unnecessary import prefixes
1 parent d098261 commit a01aea3

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
2323
mod idna;
2424

25+
use std::{borrow, fmt, hash, ops};
2526
use thiserror::Error;
2627

2728
pub use idna::Idna;
@@ -484,32 +485,32 @@ impl Ord for Url {
484485
}
485486
}
486487

487-
impl std::hash::Hash for Url {
488-
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
488+
impl hash::Hash for Url {
489+
fn hash<H: hash::Hasher>(&self, state: &mut H) {
489490
self.href().hash(state)
490491
}
491492
}
492493

493-
impl std::borrow::Borrow<str> for Url {
494+
impl borrow::Borrow<str> for Url {
494495
fn borrow(&self) -> &str {
495496
self.href()
496497
}
497498
}
498499

499-
impl std::borrow::Borrow<[u8]> for Url {
500+
impl borrow::Borrow<[u8]> for Url {
500501
fn borrow(&self) -> &[u8] {
501502
self.href().as_bytes()
502503
}
503504
}
504505

505-
impl std::convert::AsRef<[u8]> for Url {
506+
impl AsRef<[u8]> for Url {
506507
fn as_ref(&self) -> &[u8] {
507508
self.href().as_bytes()
508509
}
509510
}
510511

511-
impl std::fmt::Debug for Url {
512-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
512+
impl fmt::Debug for Url {
513+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
513514
unsafe {
514515
let components = ffi::ada_get_components(self.url).as_ref().unwrap();
515516
let mut debug = f.debug_struct("Url");
@@ -579,20 +580,20 @@ impl TryFrom<&String> for Url {
579580
}
580581
}
581582

582-
impl std::ops::Deref for Url {
583+
impl ops::Deref for Url {
583584
type Target = str;
584585
fn deref(&self) -> &Self::Target {
585586
self.href()
586587
}
587588
}
588-
impl std::convert::AsRef<str> for Url {
589+
impl AsRef<str> for Url {
589590
fn as_ref(&self) -> &str {
590591
self.href()
591592
}
592593
}
593594

594-
impl std::fmt::Display for Url {
595-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
595+
impl fmt::Display for Url {
596+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
596597
f.write_str(self.href())
597598
}
598599
}

0 commit comments

Comments
 (0)