forked from lavina/lavina
formatted user.rs
This commit is contained in:
parent
1617f428e4
commit
bb2e4eecf8
|
@ -3,9 +3,10 @@ use std::fmt;
|
||||||
use crate::core::player::PlayerId;
|
use crate::core::player::PlayerId;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub enum Prefix{
|
pub enum Prefix {
|
||||||
empty,
|
empty,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Prefix {
|
impl fmt::Display for Prefix {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
|
@ -19,6 +20,7 @@ pub struct PrefixedNick {
|
||||||
pub prefix: Prefix,
|
pub prefix: Prefix,
|
||||||
pub nick: Str,
|
pub nick: Str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PrefixedNick {
|
impl PrefixedNick {
|
||||||
pub fn fromStr(nick: Str) -> PrefixedNick {
|
pub fn fromStr(nick: Str) -> PrefixedNick {
|
||||||
PrefixedNick { prefix: Prefix::empty, nick }
|
PrefixedNick { prefix: Prefix::empty, nick }
|
||||||
|
|
Loading…
Reference in New Issue