Update lots of dependencies

This commit is contained in:
Natsu Kagami 2023-02-17 14:19:46 +01:00
parent 59551f1f6a
commit 3a9a252a1d
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
8 changed files with 370 additions and 395 deletions

View file

@ -101,7 +101,7 @@ impl Announcer {
user_id: UserId,
channels: Vec<ChannelId>,
mode: Mode,
) -> Result<Option<f32>, Error> {
) -> Result<Option<f64>, Error> {
let days_since_last_update = (now - osu_user.last_update).num_days() + 1;
let last_update = osu_user.last_update;
let (scores, user) = {
@ -153,7 +153,7 @@ impl Announcer {
.await
.pls_ok();
});
Ok(pp.map(|v| v as f32))
Ok(pp)
}
async fn scan_user(&self, u: &OsuUser, mode: Mode) -> Result<Vec<(u8, Score)>, Error> {

View file

@ -153,7 +153,7 @@ pub struct OsuUser {
pub user_id: UserId,
pub id: u64,
pub last_update: DateTime<Utc>,
pub pp: [Option<f32>; 4],
pub pp: [Option<f64>; 4],
/// More than 5 failures => gone
pub failures: u8,
}

View file

@ -45,7 +45,7 @@ impl ToQuery for (&'static str, String) {
impl ToQuery for (&'static str, DateTime<Utc>) {
fn to_query(&self) -> Vec<(&'static str, String)> {
vec![(self.0, format!("{}", self.1.date().format("%Y-%m-%d")))]
vec![(self.0, format!("{}", self.1.format("%Y-%m-%d")))]
}
}