~vpzom/lotide

ad193628a1bd471990b23042dd5dfac287b1c374 — Colin Reeder a month ago 4bfe07a
Replace strip_suffix with trim_end_matches to work on older Rust
1 files changed, 1 insertions(+), 1 deletions(-)

M src/apub_util.rs
M src/apub_util.rs => src/apub_util.rs +1 -1
@@ 101,7 101,7 @@ pub struct PublicKeyExtension<'a> {

pub fn try_strip_host<'a>(url: &'a impl AsRef<str>, host_url: &url::Url) -> Option<&'a str> {
    let host_url = host_url.as_str();
    let host_url = host_url.strip_suffix('/').unwrap_or(host_url);
    let host_url = host_url.trim_end_matches('/');

    let url = url.as_ref();