Get the latest tech news
Just Write a Test for It
This is a short appreciation post about Rust continuously guiding me towards doing The Right Thing™.
One of the most popular projects seems to be bors, a from-scratch implementation of a merge queue bot that we aim to use to manage pull requests in the main Rust compiler repository. It looked innocent enough at a first glance, until I realized that adding a NOT NULL column to an already populated table without providing some DEFAULT value for the existing rows is not a good idea. I didn’t even read the documentation apart from copying one line of code that bootstrapped the parsing process; I built the test simply by examining and following autocompletion hints.
Or read this on Hacker News