commit 9e21518e4bf8cedef4b820bd8da67800b166d9a8 parent 200ef589120dd49af431f29977b5dc3946817814 Author: kernelkind <kernelkind@gmail.com> Date: Thu, 17 Apr 2025 16:31:13 -0400 `Wallet` token parser shouldn't parse all Signed-off-by: kernelkind <kernelkind@gmail.com> Diffstat:
M | crates/notedeck/src/wallet.rs | | | 12 | +++++------- |
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/crates/notedeck/src/wallet.rs b/crates/notedeck/src/wallet.rs @@ -132,16 +132,14 @@ impl TokenSerializable for Wallet { fn parse_from_tokens<'a>( parser: &mut tokenator::TokenParser<'a>, ) -> Result<Self, tokenator::ParseError<'a>> { - parser.parse_all(|p| { - p.parse_token("nwc_uri")?; + parser.parse_token("nwc_uri")?; - let raw_uri = p.pull_token()?; + let raw_uri = parser.pull_token()?; - let wallet = - Wallet::new(raw_uri.to_owned()).map_err(|_| tokenator::ParseError::DecodeFailed)?; + let wallet = + Wallet::new(raw_uri.to_owned()).map_err(|_| tokenator::ParseError::DecodeFailed)?; - Ok(wallet) - }) + Ok(wallet) } fn serialize_tokens(&self, writer: &mut tokenator::TokenWriter) {