http crate can redacted my redacted rn
@star@amazonawaws.com
@star@amazonawaws.comErrorKind isn't pub and has no accessors. Meaning, if you were to want to try and find out why exactly parsing your str into a Uri failed, you have no way to do so programmatically.
@star@amazonawaws.comFrom or TryFrom conversions I could find, either
@star@amazonawaws.com
@star@amazonawaws.comI don't think we would expose the ErrorKind enum publicly, because it prevents adding new variants, or changing them aroundyeah i really hate it when on a friday afternoon i have nothing to do and just feel like changing Uri error types around or adding new variants because suddenly there are somehow new and exciting ways to fuck up a Uri and also I am a rust programmer who is scared of large numbers (such as 2) as the major version number for my crate. everyone knows how that feels
@star@amazonawaws.comleftpad v1032.12.1 in their package.json
@star@amazonawaws.compub fn new(input: &str) -> Result<Self, NamespaceError> {
match Uri::from_str(input) {
Ok(uri) => Ok(Self(uri)),
Err(err) => Uri::from_str(&format!("https://{input}"))
.map_err(|_| NamespaceError::InvalidUri(err))
.map(Self),
}
}