INNER CODE UNIT · Rust
deref
szabodanika/microbin · src/args.rs:285
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl FromStr for PublicUrl {
type Err = Infallible;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let uri = s.strip_suffix('/').unwrap_or(s).to_owned();
Ok(PublicUrl(uri))
}
}