-impl ViewToVec for ModAddView {
- type DbTuple = ModAddViewTuple;
- fn from_tuple_to_vec(items: Vec<Self::DbTuple>) -> Vec<Self> {
- items
- .into_iter()
- .map(|a| Self {
- mod_add: a.0,
- moderator: a.1,
- modded_person: a.2,
- })
- .collect::<Vec<Self>>()
+impl JoinView for ModAddView {
+ type JoinTuple = ModAddViewTuple;
+ fn from_tuple(a: Self::JoinTuple) -> Self {
+ Self {
+ mod_add: a.0,
+ moderator: a.1,
+ modded_person: a.2,
+ }