Clippy has a delightful lint against 'A'..'Z' because this is an exclusive range, so it only covers 'A' through 'Y'! https://rust-lang.github.io/rust-clippy/master/index.html#/almost_complete_range
Saved me a tedious bug today.
miniblog.
Related Posts
Copilot was super helpful for changing some locals to lazy_static!:
let integer_re = Regex::new(...) // old
static ref INTEGER_RE = Regex::new(...) // new
Unfortunately, it added a $ to the end of my first regex! It saved me a ton of keystrokes, but needed careful checking.
I've started playing again with A* search instead of Dijkstra for difftastic. So far it's only saved me visiting 3% of graph nodes, which is negligible.
A* works best when you have a good heuristic, but finding a good heuristic is hard. Currently:
Most of the code I write is in a garbage collected language.
I'm often surprised how much extra performance I can get when I can control allocations. I saved ~10% runtime in difftastic by moving to a zero-allocation colour library (owo_colours)!