fn find_by_name<'a, T: HasName>(name: &str, list: &'a [T]) -> Option<&'a T> {
    for c in list {
        if *c.get_name() == *name {
            return Some(c);
        }
    }
    None
}
// Fetch a reference to an entry in a list by matching against get_name().
Fetch a reference to an entry in a list by matching against get_name().
Fetch a reference to an entry in a list by matching against get_name () .
fn find_by_name<'a, T: HasName>(name: &str, list: &'a [T]) -> Option<&'a T> {
    for c in list {
        if *c.get_name() == *name {
            return Some(c);
        }
    }
    None
}
fn find_by_name < ' a , T : HasName > ( name : & str , list : & ' a [ T ] ) -> Option < & ' a T > { for c in list { if * c . get_name ( ) == * name { return Some ( c ) ; } } None }
Fetch a reference to an entry in a list by matching against get_name().
Fetch a reference to an entry in a list by matching against get_name () .
name
&str
list
&'a [T]
name
&str
list
&'a [T]