• ActuallyRuben@actuallyruben.nl
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    Unless I’m missing something, I think you can clean it up and keep your static dispatch by turning the Driver struct into a trait:

    You’d rename your struct Driver to struct DriverImpl, define a trait Driver and for the implementation you’d use impl Driver for DriverImpl where etc...