Skip to content

Commit

Permalink
improve abi example
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Jun 15, 2022
1 parent ccfba2e commit a2f7b1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/abi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use near_sdk::near_abi;

#[near_abi]
mod abi {
pub mod abi {
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
use near_sdk::near_bindgen;
use near_sdk::schemars::JsonSchema;
Expand Down Expand Up @@ -32,7 +32,7 @@ mod abi {
#[callback_unwrap] b: DoublePair,
#[callback_vec] others: Vec<DoublePair>,
) -> DoublePair {
vec![b].iter().chain(others.iter()).fold(a, |acc, el| DoublePair {
Some(b).iter().chain(others.iter()).fold(a, |acc, el| DoublePair {
first: sum_pair(&acc.first, &el.first),
second: sum_pair(&acc.second, &el.second),
})
Expand Down

0 comments on commit a2f7b1d

Please sign in to comment.