Skip to content

Commit

Permalink
[fix unwrap]
Browse files Browse the repository at this point in the history
  • Loading branch information
YinMo19 committed Dec 24, 2024
1 parent 4c16819 commit 54ef249
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/req_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ async fn choose_course(all_course: &Vec<Value>, client: Client) -> Result<(), Bo
"\n\nCourse id: {}, Course name: {}, Course teacher: {} {}",
course["id"].as_str().unwrap().green().bold(),
course["kcmc"].as_str().unwrap().purple().bold(),
course["dgjsmc"].as_str().unwrap().blue().bold(),
course["dgjsmc"].as_str().unwrap_or("").blue().bold(),
course["tyxmmc"].as_str().unwrap_or("").blue().bold(),
);

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async fn choose_course(all_course: &Vec<Value>, cookie: &str) -> Result<(), Box<
"\n\nCourse id: {}, Course name: {}, Course teacher: {} {}",
course["id"].as_str().unwrap().green().bold(),
course["kcmc"].as_str().unwrap().purple().bold(),
course["dgjsmc"].as_str().unwrap().blue().bold(),
course["dgjsmc"].as_str().unwrap_or("").blue().bold(),
course["tyxmmc"].as_str().unwrap_or("").blue().bold(),
);

Expand Down

0 comments on commit 54ef249

Please sign in to comment.