formatted user.rs

This commit is contained in:
JustTestingV 2023-09-15 19:27:13 +03:00
parent 1617f428e4
commit bb2e4eecf8
1 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ use crate::core::player::PlayerId;
pub enum Prefix {
empty,
}
impl fmt::Display for Prefix {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
@ -19,6 +20,7 @@ pub struct PrefixedNick {
pub prefix: Prefix,
pub nick: Str,
}
impl PrefixedNick {
pub fn fromStr(nick: Str) -> PrefixedNick {
PrefixedNick { prefix: Prefix::empty, nick }