Skip to main content

normalize_url

Function normalize_url 

Source
pub fn normalize_url(url: &str) -> String
Expand description

Trims a user-typed URL into the form the client stores.

Only the trailing slash is removed. Guessing a scheme is deliberately not done here: http:// and https:// differ by whether the token crosses the network in the clear, which is not a default worth inventing on the user’s behalf.