DRY with lib.rs and main.rs