Skip to content

Commit

Permalink
Addressing reviewer comments #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wrwg committed Oct 26, 2023
1 parent 6aba0c6 commit 257bea6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions third_party/move/move-binary-format/src/deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1746,8 +1746,8 @@ impl SerializedType {
#[repr(u8)]
#[derive(Clone, Copy, Debug)]
pub enum DeprecatedNominalResourceFlag {
NOMINAL_RESOURCE = 0x1,
NORMAL_STRUCT = 0x2,
NOMINAL_RESOURCE = 0x1,
NORMAL_STRUCT = 0x2,
}

impl DeprecatedNominalResourceFlag {
Expand Down
4 changes: 2 additions & 2 deletions third_party/move/move-binary-format/src/file_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ pub struct AccessSpecifier {
pub negated: bool,
/// The resource specifier.
pub resource: ResourceSpecifier,
/// The address where the resource is stored. Other fields can have wildcards.
/// The address where the resource is stored.
pub address: AddressSpecifier,
}

Expand All @@ -907,7 +907,7 @@ impl AccessKind {
}
}

/// Tries to join two kinds, returns None of no intersection.
/// Tries to join two kinds, returns None if no intersection.
pub fn try_join(self, other: Self) -> Option<Self> {
use AccessKind::*;
match (self, other) {
Expand Down
8 changes: 2 additions & 6 deletions third_party/move/move-compiler/src/parser/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,8 @@ fn parse_leading_name_access_<'a, F: FnOnce() -> &'a str>(
Ok(sp(loc, LeadingNameAccess_::Name(n)))
},
Tok::Star if allow_wildcard => {
let loc = current_token_loc(context.tokens);
context.tokens.advance()?;
Ok(sp(
loc,
LeadingNameAccess_::Name(Name::new(loc, Symbol::from("*"))),
))
let name = advance_wildcard_name(context)?;
Ok(sp(name.loc, LeadingNameAccess_::Name(name)))
},
Tok::NumValue => {
let sp!(loc, addr) = parse_address_bytes(context)?;
Expand Down

0 comments on commit 257bea6

Please sign in to comment.