mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Optimize type casting
This commit is contained in:
parent
213babb057
commit
bf783c2f3a
8 changed files with 32 additions and 28 deletions
|
@ -84,7 +84,7 @@ async fn search_subreddits(q: &str) -> Vec<Subreddit> {
|
|||
name: val(subreddit, "display_name_prefixed"),
|
||||
url: val(subreddit, "url"),
|
||||
description: val(subreddit, "public_description"),
|
||||
subscribers: subreddit["data"]["subscribers"].as_u64().unwrap_or_default() as i64,
|
||||
subscribers: subreddit["data"]["subscribers"].as_i64().unwrap_or_default(),
|
||||
})
|
||||
.collect::<Vec<Subreddit>>(),
|
||||
_ => Vec::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue