pub fn grade(&self, grade: u32) -> Option<Vec<String>> {
        let mut result = vec![];

        for t in self.grade_table.iter() {
            if t.1 == grade {
                result.push(t.0.clone());
            }
        }

        if result.is_empty() {
            None
        } else {
            result.sort();
            Some(result)
        }
    }
// If grade returned an `Option<&Vec<String>>`,
// the internal implementation would be forced to keep a `Vec<String>` to lend out.
// By returning an owned vector instead,
// the internal implementation is free to use whatever it chooses.
If grade returned an `Option<&Vec>`,
the internal implementation would be forced to keep a `Vec` to lend out.
By returning an owned vector instead,
the internal implementation is free to use whatever it chooses.
If grade returned an ` Option<&Vec > ` the internal implementation would be forced to keep a ` Vec ` to lend out . By returning an owned vector instead the internal implementation is free to use whatever it chooses .
pub fn grade(&self, grade: u32) -> Option<Vec<String>> {
        let mut result = vec![];
        for t in self.grade_table.iter() {
            if t.1 == grade {
                result.push(t.0.clone());
            }
        }
        if result.is_empty() {
            None
        } else {
            result.sort();
            Some(result)
        }
    }
pub fn grade ( & self , grade : u32 ) -> Option < Vec < String > > { let mut result = vec ! [ ] ; for t in self . grade_table . iter ( ) { if t . 1 == grade { result . push ( t . 0 . clone ( ) ) ; } } if result . is_empty ( ) { None } else { result . sort ( ) ; Some ( result ) } }
If grade returned an `Option<&Vec<String>>`,
the internal implementation would be forced to keep a `Vec<String>` to lend out.
If grade returned an ` Option<&Vec<String >> ` the internal implementation would be forced to keep a ` Vec<String > ` to lend out .
&self
grade
u32