use &: in closure passed to trim_chars in ex_5

ex_5 wouldn't build. I don't know much Rust, but this builds at least.