Skip to content

Commit

Permalink
remove string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvja committed Nov 6, 2024
1 parent fbf1eb2 commit f777c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ fn call_bridge_escrow(
/// validation on accounts is performed.
fn parse_bridge_memo(memo: &str) -> Option<(String, String)> {
let parsed = serde_json::from_str::<serde_json::Value>(memo).ok()?;
let memo_str = parsed.get("memo")?.as_str()?.to_string();
let memo_str = parsed.get("memo")?.as_str()?;
let (count, rest) = memo_str.split_once(',')?;
let mut current = rest;
// Skip accounts
Expand Down

0 comments on commit f777c28

Please sign in to comment.