Code Explainers
use std::borrow::Cow; fn sanitize_filename(input: &str) -> Cow<'_, str> { if input.chars().all(|c| c.is_alphanumeric() || matches!(c, '.' | '-' | '_')) {