Sha256: 00693402b0e1a248e3cf0a76f09dacb7fb684f10aad3a9db7ce6eefc5ecf2bd5
Contents?: true
Size: 692 Bytes
Versions: 9
Compression:
Stored size: 692 Bytes
Contents
pub struct School {} impl School { pub fn new() -> School { unimplemented!() } pub fn add(&mut self, grade: u32, student: &str) { unimplemented!("Add {} to the roster for {}", student, grade) } pub fn grades(&self) -> Vec<u32> { unimplemented!() } // 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. pub fn grade(&self, grade: u32) -> Option<Vec<String>> { unimplemented!("Return the list of students in {}", grade) } }
Version data entries
9 entries across 9 versions & 1 rubygems