Skip to content

Extract printing behaviour into a report or summary method with a default implementation #4

@drmason13

Description

@drmason13

Currently this is done inline in the run method.

// TODO: extract printing behaviour into a report or summary method with a default implementation
println!(
    "Day {0}, Part 1\n\
    {1}\n\n\
    Day {0}, Part 1\n\
    {2}",
    Day, part1_output, part2_output
);

I can foresee plenty of reasons to want to customise this and I'd like to enable that more easily.

Separating into two methods means the user can do that without having to re-implement the running of part1 and part2 which is a bit more involved..

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions