by ComputerGuru · 9y ago · 0 comments
However, I was going to write this anyway as it satisfies an itch I've had for a while. I had an implementation of `rewrite` as a bash script previously, but was not satisfied with it because I'm using `rewrite` in critical parts of my workflow and just don't trust bash the same way I do rust (or C/C++ or any other language, for that matter).
If you're also new to there are a few new things I've learned about rust that show up in the commit history (though not as much as I would have liked). In particular, using .expect() and .to_string_lossy() to avoid using .unwrap() directly (except where user input isn't a possible cause of failure). I had some try! code in there that was replaced by the new ? operator (not to be confused with the same operator in other languages like C#, the ? in rust is more of an inline try..catch rather than a null test/coalescing operator) but that code didn't even make the first commit.
No comments yet.