mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Fix clippy warnings and typos (#434)
* Fix clippy warnings. * Fixe more clippy warnings. * Fix exided lifetime warnings in clippy. * Fix errors. * Fix errors. --------- Co-authored-by: Guy Chronister <guyc.linux.patches@gmail.com>
This commit is contained in:
co-authored by
Guy Chronister
parent
6bc3908fe2
commit
f19bf2e30f
@@ -11,7 +11,7 @@ pub struct CachedSearch<'a> {
|
||||
}
|
||||
|
||||
impl<'a> CachedSearch<'a> {
|
||||
pub fn new(client: &steamgriddb_api::Client) -> CachedSearch {
|
||||
pub fn new(client: &'a steamgriddb_api::Client) -> CachedSearch<'a> {
|
||||
CachedSearch {
|
||||
search_map: get_search_map(),
|
||||
client,
|
||||
|
||||
@@ -45,7 +45,7 @@ impl SearchSettings for Settings {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn download_images_for_users<'b>(
|
||||
pub async fn download_images_for_users(
|
||||
settings: &Settings,
|
||||
users: &[SteamUsersInfo],
|
||||
sender: &mut Option<Sender<SyncProgress>>,
|
||||
@@ -388,10 +388,10 @@ async fn get_steam_image_url(game_id: usize, image_type: &ImageType) -> Option<S
|
||||
d.platforms
|
||||
.map(|p| p.steam.map(|s| s.metadata.map(|m| m.store_asset_mtime)))
|
||||
});
|
||||
if let (Some(Some(Some(steam_app_id))), Some(Some(Some(Some(Some(mtime)))))) =
|
||||
if let (Some(Some(Some(steam_app_id))), Some(Some(Some(Some(mtime))))) =
|
||||
(game_id, mtime)
|
||||
{
|
||||
return Some(image_type.steam_url(steam_app_id, mtime));
|
||||
return Some(image_type.steam_url(steam_app_id.to_string(), mtime?));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,10 +412,10 @@ async fn get_steam_icon_url(game_id: usize) -> Option<String> {
|
||||
d.platforms
|
||||
.map(|p| p.steam.map(|s| s.metadata.map(|m| m.clienticon)))
|
||||
});
|
||||
if let (Some(Some(Some(steam_app_id))), Some(Some(Some(Some(Some(mtime)))))) =
|
||||
if let (Some(Some(Some(steam_app_id))), Some(Some(Some(Some(mtime))))) =
|
||||
(game_id, mtime)
|
||||
{
|
||||
return Some(icon_url(&steam_app_id, &mtime));
|
||||
return Some(icon_url(&steam_app_id.to_string(), &mtime?.to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user