Skip to content

Commit

Permalink
Add actual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-pease committed Jun 3, 2024
1 parent 3ddf641 commit c99f7e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stellar_rust_sdk_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ use syn::{parse_macro_input, DeriveInput};
pub fn pagination_macro(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let struct_name = &input.ident;

let (impl_generics, type_generics, where_clause) = input.generics.split_for_impl();

let expanded = quote! {
impl Paginatable for #struct_name {
impl #impl_generics Paginatable for #struct_name #type_generics #where_clause {
fn set_cursor(self, cursor: u32) -> Result<Self, String> {
// Always accept the cursor since it's non-optional in the setter
if cursor < 1 {
Expand Down

0 comments on commit c99f7e0

Please sign in to comment.