Skip to content

Commit

Permalink
use simple type
Browse files Browse the repository at this point in the history
  • Loading branch information
steelgeek091 committed Apr 15, 2024
1 parent d32294e commit 1306982
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moveos/smt/src/update_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
use crate::{Key, SMTObject, Value};
use std::collections::BTreeMap;

type SMTObjectResult<K, V> = anyhow::Result<Vec<(SMTObject<K>, Option<SMTObject<V>>)>>;

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct UpdateSet<K, V> {
updates: BTreeMap<K, Option<V>>,
Expand Down Expand Up @@ -67,7 +69,7 @@ where
self.updates.clear();
}

pub(crate) fn into_updates(self) -> anyhow::Result<Vec<(SMTObject<K>, Option<SMTObject<V>>)>> {
pub(crate) fn into_updates(self) -> SMTObjectResult<K, V> {
let mut ret = Vec::new();
for (k, v_opt) in self.into_iter() {
let key = k.into_object()?;
Expand Down

0 comments on commit 1306982

Please sign in to comment.