Use Either
enum, instead of creating multiple enums and manually implementing traits for each one
#5513
Labels
Either
enum, instead of creating multiple enums and manually implementing traits for each one
#5513
The messy enum problem mostly applies to enums in the apub crate. For example,
SiteOrCommunityOrUser
could becomeEither<ApubSite, Either<ApubCommunity, ApubUser>>
. In this case, the activitypub_federation crate would have to implement its traits forEither
.Should be done after #5496 to avoid merge conflicts.
https://docs.rs/either/latest/either/enum.Either.html
The text was updated successfully, but these errors were encountered: