Display set counts in player info
This commit is contained in:
parent
db85674601
commit
14b5b2cafd
5 changed files with 44 additions and 5 deletions
|
|
@ -14,6 +14,15 @@ pub enum StringOrInt {
|
|||
Int(u64),
|
||||
}
|
||||
|
||||
impl StringOrInt {
|
||||
pub fn from_string(s: &str) -> Self {
|
||||
match s.parse::<u64>() {
|
||||
Ok(x) => StringOrInt::Int(x),
|
||||
Err(_) => StringOrInt::String(s.to_owned()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for StringOrInt {
|
||||
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
|
||||
match self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue