August 22, 2019
In my second post I explained how shapeless can add, remove and align fields from case classes to match another type. The code works but it’s pretty clunky. In this post I will clean it up a bit to make it less verbose
To follow along it’s best to check out the accompanying source code from my Github repo and checkout the 9-cleanup tag Automatically dropping unused fields In the current implementation I need to manually drop the isDiesel flag from the Vehicle as it’s not needed by the Reservation case class.