forked from near/near-sdk-rs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: circumvent near#1211 with sufficient highlight
- Loading branch information
dj8yf0μl
committed
Jun 28, 2024
1 parent
1ca16a4
commit e98b53f
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//! Method signature uses lifetime. | ||
use near_sdk::near; | ||
|
||
#[near(contract_state)] | ||
#[derive(Default)] | ||
struct Ident { | ||
value: u32, | ||
} | ||
|
||
#[near] | ||
impl Ident { | ||
pub fn is_ident<'a>(&self, other: &'a u32) -> Option<&'a u32> { | ||
if *other == self.value { | ||
Some(other) | ||
} else { | ||
None | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |