Crates.io | rinse |
lib.rs | rinse |
version | 0.1.0 |
source | src |
created_at | 2024-03-10 23:47:09.977473 |
updated_at | 2024-03-10 23:47:09.977473 |
description | declutter url lists 🧽 |
homepage | |
repository | https://github.com/redcloudvg/rinse |
max_upload_size | |
id | 1169044 |
size | 38,292 |
declutter url lists
use rinse::Rinse;
fn main() {
let rinse = Rinse::default();
// Remove duplicate URLs
assert!(rinse.declutter_url("https://www.wikipedia.org"));
assert!(!rinse.declutter_url("https://www.wikipedia.org"));
// Remove duplicate URLs without reading query parameter values
assert!(rinse.declutter_url("https://httpbin.org/get?hello=world"));
assert!(!rinse.declutter_url("https://httpbin.org/get?hello=earth"));
assert!(rinse.declutter_url("https://httpbin.org/get?hello=world&foo=bar"));
// Allowed extensions
assert!(rinse.declutter_url("https://www.rust-lang.org/"));
assert!(rinse.declutter_url("https://www.rust-lang.org/static/scripts/init.js"));
assert!(!rinse.declutter_url("https://www.rust-lang.org/static/images/site.webmanifest"));
assert!(!rinse.declutter_url("https://www.rust-lang.org/static/styles/a11y-dark.css"));
}
Not yet implemented