~joshleeb/ownrs

480adfb8d478d440f26909225a6e3ed59d7e4d5c — Josh Leeb-du Toit 21 days ago 42fc5fa master
Fix minor clippy warnings
1 files changed, 3 insertions(+), 3 deletions(-)

M src/owner.rs
M src/owner.rs => src/owner.rs +3 -3
@@ 10,7 10,7 @@ pub enum Owner {

impl Owner {
    fn handle<'a>(handle: &'a str) -> Self {
        Owner::Handle(handle.trim_start_matches("@").to_string())
        Owner::Handle(handle.trim_start_matches('@').to_string())
    }

    fn email<'a>(email: &'a str) -> Self {


@@ 24,10 24,10 @@ impl Owner {

impl<'a> From<&'a str> for Owner {
    fn from(input: &'a str) -> Self {
        if input.starts_with("@") {
        if input.starts_with('@') {
            return Owner::handle(input);
        }
        if input.contains("@") && !input.ends_with("@") {
        if input.contains('@') && !input.ends_with('@') {
            return Owner::email(input);
        }
        Owner::text(input)