I refactored some Rust string splitting logic:
old: &[&str] -> Vec<String>
new: &[&str] -> Vec<&str>
It's a little faster, but it's an interesting type signature. You can figure out more of how the new one works! It must be slicing into the input string.
miniblog.
Related Posts
Program slicing for Rust in VS Code, allowing you to see which parts of your program affect the current expression!
Idealized Commit Logs:Code Simplification via Program Slicing https://www.youtube.com/watch?v=dSqLt8BgbRQ (powerful technique for simplifying code contextually)