This commit is contained in:
young 2022-11-05 18:08:09 +09:00
parent 2ffb454b12
commit 51c535c8ba

View File

@ -17,7 +17,13 @@ trait AppendBar {
fn append_bar(self) -> Self; fn append_bar(self) -> Self;
} }
//TODO: Add your code here impl AppendBar for Vec<String> {
fn append_bar(self) -> Vec<String> {
let mut _vec = self.clone();
_vec.push(String::from("Bar"));
return _vec;
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {