Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Jul 4, 2024
1 parent f69a468 commit 4478d5a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions moveos/moveos-object-runtime/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,15 @@ impl ObjectRuntime {
let timestamp_ref = timestamp_obj
.borrow_value(None)
.expect("Failed to borrow timestamp value");
let struct_ref = timestamp_ref.value_as::<StructRef>().expect("Failed to get struct ref");
Timestamp::from_runtime_value(struct_ref.read_ref().expect("Failed to read timestamp value"))
.expect("Failed to convert timestamp value to timestamp")
let struct_ref = timestamp_ref
.value_as::<StructRef>()
.expect("Failed to get struct ref");
Timestamp::from_runtime_value(
struct_ref
.read_ref()
.expect("Failed to read timestamp value"),
)
.expect("Failed to convert timestamp value to timestamp")
}

/// Load Object to the ObjectRuntime.
Expand Down

0 comments on commit 4478d5a

Please sign in to comment.