eval
Log in

Cache Lines

100 points

Cache needs to remember the split-out lines of `raw`. The code below does not compile. Redesign the struct and implement `new` and `lines` so `lines` returns the split lines, in order, split on '\n'.

Required signature

pub struct Cache { /* your fields */ }  impl Cache {     pub fn new(raw: String) -> Self;     pub fn lines(&self) -> Vec<&str>; }

Visible tests

Your solution

Log in to submit a solution.