Skip to content

Commit

Permalink
fix(runtime): lend token parsing clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-savu committed Feb 16, 2023
1 parent 831c0ee commit 3e4b2d3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
74 changes: 37 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion runtime/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ impl TryFromSymbol for CurrencyId {
id if id == KSM.symbol() => Ok(Token(KSM)),
id if id == KBTC.symbol() => Ok(Token(KBTC)),
id if id == KINT.symbol() => Ok(Token(KINT)),
id if id.chars().nth(0) == Some(LEND_TOKEN_SYMBOL_PREFIX) => {
// Does the first character match the lend token prefix?
id if id.chars().next() == Some(LEND_TOKEN_SYMBOL_PREFIX) => {
let underlying_id = Self::try_from_symbol(id[1..].to_string())?;
LendingAssets::get_lend_token_id(underlying_id)
}
Expand Down

0 comments on commit 3e4b2d3

Please sign in to comment.