-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #273 from Emurgo/ruslan/mint-fix
Fixing minting API
- Loading branch information
Showing
8 changed files
with
509 additions
and
122 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
pub trait NoneOrEmpty { | ||
fn is_none_or_empty(&self) -> bool; | ||
} | ||
|
||
impl<T: NoneOrEmpty> NoneOrEmpty for &T { | ||
fn is_none_or_empty(&self) -> bool { | ||
(*self).is_none_or_empty() | ||
} | ||
} | ||
|
||
impl<T: NoneOrEmpty> NoneOrEmpty for Option<T> { | ||
fn is_none_or_empty(&self) -> bool { | ||
self.is_none() || self.as_ref().unwrap().is_none_or_empty() | ||
} | ||
} |
Oops, something went wrong.