Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Aug 18, 2023
1 parent b795c0c commit fb7a3a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/sol-types/tests/ui/type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ error: proc macro panicked
741 | | }
| |_^
|
= help: message: mapping types are unsupported: TypeMapping { key: TypeMapping { key: Custom([SolIdent("a")]), key_name: Some(SolIdent("b")), value: Custom([SolIdent("c")]), value_name: Some(SolIdent("d")) }, key_name: Some(SolIdent("e")), value: TypeMapping { key: Custom([SolIdent("f")]), key_name: Some(SolIdent("g")), value: Custom([SolIdent("h")]), value_name: Some(SolIdent("i")) }, value_name: Some(SolIdent("j")) }
= help: message: mapping types are unsupported: TypeMapping { key: Type::TypeMapping { key: Type::Custom([SolIdent("a")]), key_name: Some(SolIdent("b")), value: Type::Custom([SolIdent("c")]), value_name: Some(SolIdent("d")) }, key_name: Some(SolIdent("e")), value: Type::TypeMapping { key: Type::Custom([SolIdent("f")]), key_name: Some(SolIdent("g")), value: Type::Custom([SolIdent("h")]), value_name: Some(SolIdent("i")) }, value_name: Some(SolIdent("j")) }

error: proc macro panicked
--> tests/ui/type.rs:743:1
Expand All @@ -84,7 +84,7 @@ error: proc macro panicked
745 | | }
| |_^
|
= help: message: mapping types are unsupported: TypeMapping { key: Uint(Some(256)), key_name: Some(SolIdent("a")), value: Bool, value_name: Some(SolIdent("b")) }
= help: message: mapping types are unsupported: TypeMapping { key: Type::Uint(Some(256)), key_name: Some(SolIdent("a")), value: Type::Bool, value_name: Some(SolIdent("b")) }

error[E0412]: cannot find type `bytes_` in this scope
--> tests/ui/type.rs:205:9
Expand Down
2 changes: 1 addition & 1 deletion crates/syn-solidity/src/attribute/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl DerefMut for FunctionAttributes {
impl Parse for FunctionAttributes {
fn parse(input: ParseStream<'_>) -> Result<Self> {
let mut attributes = Vec::<FunctionAttribute>::new();
while !(input.is_empty() || input.peek(kw::returns) || input.peek(Ident::peek_any)) {
while !input.is_empty() && !input.peek(kw::returns) && input.peek(Ident::peek_any) {
let attr: FunctionAttribute = input.parse()?;
if let Some(prev) = attributes.iter().find(|a| **a == attr) {
let mut e = Error::new(attr.span(), "duplicate attribute");
Expand Down

0 comments on commit fb7a3a9

Please sign in to comment.