1 2 3 4 5 6 7 8 9 10
use crate::ser::percent_encode; #[inline] pub fn escape_path(url_path: &str) -> String { url_path .split('/') .map(|segment| percent_encode(segment)) .collect::<Vec<_>>() .join("/") }