(value: &str)
| 3577 | } |
| 3578 | |
| 3579 | fn percent_encode(value: &str) -> String { |
| 3580 | let mut encoded = String::new(); |
| 3581 | for byte in value.as_bytes() { |
| 3582 | match byte { |
| 3583 | b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'.' | b'_' | b'~' => { |
| 3584 | encoded.push(*byte as char); |
| 3585 | } |
| 3586 | _ => encoded.push_str(&format!("%{byte:02X}")), |
| 3587 | } |
| 3588 | } |
| 3589 | encoded |
| 3590 | } |
| 3591 | |
| 3592 | fn main() -> anyhow::Result<()> { |
| 3593 | logging::init(); |
no outgoing calls
no test coverage detected