use untrusted_value::derive::untrusted_inputs;
use untrusted_value::SanitizeWith;
#[allow(clippy::unnecessary_wraps)]
fn no_sanitize<T>(value: T) -> Result<T, ()> {
Ok(value)
}
#[untrusted_inputs]
fn index(name: &str) -> Result<String, ()> {
let name = name.sanitize_with(no_sanitize)?;
Ok(format!("Hello, {name}!"))
}
fn main() {
assert!(index("<script>alert('xss')</script>").is_err());
}