Episode #3

A Code Review

Today we will do our first code review.

I picked a library from my colleague Luca Pizzamiglio called repoctl, which is a tool for handling FreeBSD package files in Rust. The goal is to improve the codebase and make it more robust and idiomatic.

▶ Run and edit the code on Gitpod

Keywords

Option, Result, Error handling, URL parsing, external crates

Things I mentioned during the show

Things I should have mentioned (but forgot)

  • You should definitely create a pull request to repoctl! Luca and me will support you if we can. Below are some ideas.
  • Replace things like fuf and fuf2 in the tests with a data provider
  • Use unwrap_or_default() where useful
  • Run clippy on the project and fix all code smells.
  • Somebody should implement Default for Repository.

Resources and licenses

Support!

Preparing, recording, and editing an episode takes a substantial amount of time (around 30 hours total). I do all of this next to my fulltime dayjob. If you want to show your appreciation and help me keep the content free for everybody to enjoy, please consider sponsoring me on Github - no matter the amount. ❤️