Skip to content

Commit

Permalink
[rpc] fix accesspath (#2698)
Browse files Browse the repository at this point in the history
  • Loading branch information
vegetabledogdog authored Sep 26, 2024
1 parent c7b0837 commit 3026658
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moveos/moveos-types/src/access_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl FromStr for Path {
let object_ids = iter.next().unwrap_or("");
let object_ids = object_ids
.split(',')
.filter(|s| !s.is_empty())
.map(ObjectID::from_str)
.collect::<Result<Vec<_>, _>>()?;
Ok(Path::Object { object_ids })
Expand Down Expand Up @@ -414,6 +415,7 @@ mod tests {
#[test]
pub fn test_path() {
test_path_roundtrip("/object/0x1");
test_path_roundtrip("/object/0x1,");
test_path_roundtrip("/object/0x1,0x2");
test_path_roundtrip("/resource/0x1/0x2::m::S");
test_path_roundtrip("/resource/0x1/0x2::m1::S1,0x3::m2::S2");
Expand Down

0 comments on commit 3026658

Please sign in to comment.