Remove Move Loader's use of GenericError (#8289)

automerge
This commit is contained in:
Jack May
2020-02-14 14:49:21 -08:00
committed by GitHub
parent 965361ff69
commit 644a7f9a44
6 changed files with 38 additions and 12 deletions

View File

@@ -65,7 +65,9 @@ impl DataStore {
/// Read an account's resource
pub fn read_account_resource(&self, addr: &AccountAddress) -> Option<AccountResource> {
let access_path = create_access_path(&addr, account_config::account_struct_tag());
self.data.get(&access_path).and_then(|blob| { SimpleDeserializer::deserialize(blob).ok() })
self.data
.get(&access_path)
.and_then(|blob| SimpleDeserializer::deserialize(blob).ok())
}
/// Sets a (key, value) pair within this data store.