<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Create a function in Rust that takes two strings and returns true if they are anagrams.
<|im_end|>
<|im_start|>assistant
fn anagrams(s1: &str, s2: &str) -> bool {
    let s1 = s1.to_lowercase().chars().collect::<Vec<char>>();
    let s2 = s2.to_lowercase().chars().collect::<Vec<char>>();
    s1.sort_unstable();
    s2.sort_unstable();
    s1 == s2
}<|im_end|>
