diff --git a/src/models/pagination/mod.rs b/src/models/pagination/mod.rs index c3ac7aa..90a23c7 100644 --- a/src/models/pagination/mod.rs +++ b/src/models/pagination/mod.rs @@ -43,8 +43,8 @@ pub struct Pagination { pub page_size: Option, } -impl From for bpr::protobuf::pagination::Pagination { - fn from(d: Pagination) -> Self { +impl From<&Pagination> for bpr::protobuf::pagination::Pagination { + fn from(d: &Pagination) -> Self { bpr::protobuf::pagination::Pagination { page: d.page, page_size: d.page_size, @@ -52,8 +52,8 @@ impl From for bpr::protobuf::pagination::Pagination { } } -impl From for Pagination { - fn from(d: bpr::protobuf::pagination::Pagination) -> Self { +impl From<&bpr::protobuf::pagination::Pagination> for Pagination { + fn from(d: &bpr::protobuf::pagination::Pagination) -> Self { Pagination { page: d.page, page_size: d.page_size,