Add domain history clear confirmation
This commit is contained in:
@@ -52,6 +52,13 @@ impl UrlText {
|
||||
.unwrap_or_else(|| self.value.clone())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn host(&self) -> Option<String> {
|
||||
Url::parse(&self.value)
|
||||
.ok()
|
||||
.and_then(|url| url.host_str().map(|host| host.to_ascii_lowercase()))
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn display_url(&self) -> String {
|
||||
let Ok(url) = Url::parse(&self.value) else {
|
||||
|
||||
Reference in New Issue
Block a user