mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
Update lots of dependencies
This commit is contained in:
parent
59551f1f6a
commit
3a9a252a1d
8 changed files with 370 additions and 395 deletions
|
@ -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> {
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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")))]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue