Skip to content

Commit

Permalink
fix: ? instead unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed May 29, 2024
1 parent 6219fa2 commit cb2ee5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/service/trade/wechat/recall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub async fn wechat_pay_recall(header_map: HeaderMap, body: String) -> Result<St

//verify signature
verify_signature(&pub_key, timestamp, nonce, signature, body)
.map_err(|e| format!(r#"{{"code": "FAIL", "message": "{}"}}"#, e.to_string())).unwrap();
.map_err(|e| format!(r#"{{"code": "FAIL", "message": "{}"}}"#, e.to_string()))?;

let res = add_level_to_user(trade.user_id, Level::from(trade.level as u8), trade.period, trade.start_time).await;
if res.is_err() {
Expand Down

0 comments on commit cb2ee5b

Please sign in to comment.