-impl ViewToVec for ModRemoveCommentView {
- type DbTuple = ModRemoveCommentViewTuple;
- fn from_tuple_to_vec(items: Vec<Self::DbTuple>) -> Vec<Self> {
- items
- .into_iter()
- .map(|a| Self {
- mod_remove_comment: a.0,
- moderator: a.1,
- comment: a.2,
- commenter: a.3,
- post: a.4,
- community: a.5,
- })
- .collect::<Vec<Self>>()
+impl JoinView for ModRemoveCommentView {
+ type JoinTuple = ModRemoveCommentViewTuple;
+ fn from_tuple(a: Self::JoinTuple) -> Self {
+ Self {
+ mod_remove_comment: a.0,
+ moderator: a.1,
+ comment: a.2,
+ commenter: a.3,
+ post: a.4,
+ community: a.5,
+ }