mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
remove extra conditions
This commit is contained in:
parent
fa02234cbd
commit
042e2a16ea
1 changed files with 1 additions and 9 deletions
|
|
@ -23,15 +23,7 @@ impl Request {
|
||||||
Self::Gemini(ref request) => request.uri.clone(),
|
Self::Gemini(ref request) => request.uri.clone(),
|
||||||
Self::Titan(ref request) => request.uri.clone(),
|
Self::Titan(ref request) => request.uri.clone(),
|
||||||
};
|
};
|
||||||
let port = uri.port();
|
match crate::gio::network_address::from_uri(&uri, default_port) {
|
||||||
match crate::gio::network_address::from_uri(
|
|
||||||
&uri,
|
|
||||||
if port.is_positive() {
|
|
||||||
port as u16
|
|
||||||
} else {
|
|
||||||
default_port
|
|
||||||
},
|
|
||||||
) {
|
|
||||||
Ok(network_address) => Ok(network_address),
|
Ok(network_address) => Ok(network_address),
|
||||||
Err(e) => Err(Error::NetworkAddress(e)),
|
Err(e) => Err(Error::NetworkAddress(e)),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue