-impl ViewToVec for PersonBlockView {
- type DbTuple = PersonBlockViewTuple;
- fn from_tuple_to_vec(items: Vec<Self::DbTuple>) -> Vec<Self> {
- items
- .into_iter()
- .map(|a| Self {
- person: a.0,
- target: a.1,
- })
- .collect::<Vec<Self>>()
+impl JoinView for PersonBlockView {
+ type JoinTuple = PersonBlockViewTuple;
+ fn from_tuple(a: Self::JoinTuple) -> Self {
+ Self {
+ person: a.0,
+ target: a.1,
+ }