We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0d0fa7 commit b12aa6eCopy full SHA for b12aa6e
python/src/lib.rs
@@ -240,7 +240,7 @@ impl FaupCompat {
240
241
fn get_credential(&self) -> Option<String> {
242
let url = self.url.as_ref();
243
- Some(url.and_then(|u| u.credentials())?)
+ url.and_then(|u| u.credentials())
244
}
245
246
fn get_domain(&self) -> Option<&str> {
@@ -280,7 +280,7 @@ impl FaupCompat {
280
281
282
fn get_domain_without_tld(&self) -> Option<&str> {
283
- let domain = self.url.as_ref()?.domain.as_deref().clone();
+ let domain = self.url.as_ref()?.domain.as_deref();
284
let tld = self.url.as_ref()?.suffix.as_deref();
285
if domain.is_some() && tld.is_some() {
286
Some(&domain?[0..domain?.chars().count() - tld?.chars().count() - 1])
0 commit comments