Diff
Not logged in

Differences From Artifact [13c3054d70]:

To Artifact [2765c31216]:


71
72
73
74
75
76
77
78

79
80
81
82
83
        match self.entries.iter().find(|entry| entry.name == name) {
            Some(entry) => Ok(entry.data.clone()),
            None => Err(SimpleStorageError {}),
        }
    }

    fn put(&mut self, name: Vec<u8>, data: Vec<u8>) -> Result<(), SimpleStorageError> {
        Ok(self.entries.push(Entry {

                                 name: name,
                                 data: data,
                             }))
    }
}







|
>
|
|
|


71
72
73
74
75
76
77
78
79
80
81
82
83
84
        match self.entries.iter().find(|entry| entry.name == name) {
            Some(entry) => Ok(entry.data.clone()),
            None => Err(SimpleStorageError {}),
        }
    }

    fn put(&mut self, name: Vec<u8>, data: Vec<u8>) -> Result<(), SimpleStorageError> {
        Ok(self.entries
               .push(Entry {
                         name: name,
                         data: data,
                     }))
    }
}