Ad
  • Custom User Avatar

    It doesn't seem to be bad at all. There are always nitpicks like an unecessary .to_string() before parsing and type hint that would have been inferred, but it looks like pretty standard Rust code.

    Though I do wonder, if you wanted to write a Perl solution, why not fork it in that language directly?

  • Custom User Avatar

    Thanks, I'm really not very good at Rust as you can probably tell.

  • Custom User Avatar

    Just so you know, the purpose of .expect("text goes here") is to provide context if the unwrap panics. If you don't feel the need to provide context, a simple .unwrap() makes more sense.