mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
osu: Implement check button!
This commit is contained in:
parent
1d250b8ea7
commit
32053c3fe3
11 changed files with 274 additions and 75 deletions
|
@ -1,3 +1,5 @@
|
|||
use core::fmt;
|
||||
|
||||
use crate::models::{Mode, Mods};
|
||||
use crate::Client;
|
||||
use rosu_v2::error::OsuError;
|
||||
|
@ -9,6 +11,15 @@ pub enum UserID {
|
|||
ID(u64),
|
||||
}
|
||||
|
||||
impl fmt::Display for UserID {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
UserID::Username(u) => u.fmt(f),
|
||||
UserID::ID(id) => id.fmt(f),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<UserID> for rosu_v2::prelude::UserId {
|
||||
fn from(value: UserID) -> Self {
|
||||
match value {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue