From 860c44e93df067e9ad1558ba20fcd30d1284ec5e Mon Sep 17 00:00:00 2001 From: GyDi Date: Sun, 19 Dec 2021 14:07:13 +0800 Subject: [PATCH] chore: someting --- src-tauri/src/utils/fetch.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/utils/fetch.rs b/src-tauri/src/utils/fetch.rs index 043967e..7dfe892 100644 --- a/src-tauri/src/utils/fetch.rs +++ b/src-tauri/src/utils/fetch.rs @@ -32,11 +32,10 @@ pub async fn fetch_profile(url: &str) -> Option { // parse the Subscription Userinfo let extra = { - let sub_info = header - .get("Subscription-Userinfo") - .unwrap() - .to_str() - .unwrap(); + let sub_info = match header.get("Subscription-Userinfo") { + Some(value) => value.to_str().unwrap_or(""), + None => "", + }; ProfileExtra { upload: parse_string(sub_info, "upload=").unwrap_or(0),