easy/
lib.rs

1mod string;
2
3
4#[cfg(test)]
5mod tests {
6    #[test]
7    fn it_works() {
8        use string::Htmlentities;
9        println!("{}", "<script>alert(1);</script>".to_string().html_entities());
10    }
11}