fn from_str(role: &str) -> Self {
        match role {
            "admin" => Self::Admin,
            _ => Self::User,
        }
    }
// Doesn't use std::str::FromStr since the trait impl returns a Result and this is infallible.
Doesn't use std::str::FromStr since the trait impl returns a Result and this is infallible.
Doesn ' t use std :: str :: FromStr since the trait impl returns a Result and this is infallible .
fn from_str(role: &str) -> Self {
        match role {
            "admin" => Self::Admin,
            _ => Self::User,
        }
    }
fn from_str ( role : & str ) -> Self { match role { " " => Self :: Admin , _ => Self :: User , } }
Doesn't use std::str::FromStr since the trait impl returns a Result and this is infallible.
Doesn ' t use std :: str :: FromStr since the trait impl returns a Result and this is infallible .
role
&str
role
&str