From bb2e4eecf807970ff98b66465d3e26c984f27330 Mon Sep 17 00:00:00 2001 From: JustTestingV Date: Fri, 15 Sep 2023 19:27:13 +0300 Subject: [PATCH] formatted user.rs --- src/protos/irc/user.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protos/irc/user.rs b/src/protos/irc/user.rs index 2360925..7033fea 100644 --- a/src/protos/irc/user.rs +++ b/src/protos/irc/user.rs @@ -3,9 +3,10 @@ use std::fmt; use crate::core::player::PlayerId; #[derive(Clone, Debug, PartialEq, Eq)] -pub enum Prefix{ - empty, +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 }