Skip to content

Commit

Permalink
refactor: add explicit lifetime names
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKruckenberg committed Nov 20, 2024
1 parent ff09f91 commit b733d7c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/wast/src/component/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub enum ComponentField<'a> {
}

impl<'a> ComponentField<'a> {
fn parse_remaining(parser: Parser<'a>) -> Result<Vec<ComponentField>> {
fn parse_remaining(parser: Parser<'a>) -> Result<Vec<ComponentField<'a>>> {
let mut fields = Vec::new();
while !parser.is_empty() {
fields.push(parser.parens(ComponentField::parse)?);
Expand Down
2 changes: 1 addition & 1 deletion libs/wast/src/component/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'a> Parse<'a> for ItemSigNoName<'a> {

fn parse_item_sig<'a>(parser: Parser<'a>, name: bool) -> Result<ItemSig<'a>> {
let mut l = parser.lookahead1();
let (span, parse_kind): (_, fn(Parser<'a>) -> Result<ItemSigKind>) = if l.peek::<kw::core>()? {
let (span, parse_kind): (_, fn(Parser<'a>) -> Result<ItemSigKind<'a>>) = if l.peek::<kw::core>()? {
let span = parser.parse::<kw::core>()?.0;
parser.parse::<kw::module>()?;
(span, |parser| Ok(ItemSigKind::CoreModule(parser.parse()?)))
Expand Down
2 changes: 1 addition & 1 deletion libs/wast/src/core/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ enum If<'a> {
}

impl<'a> ExpressionParser<'a> {
fn new(parser: Parser<'a>) -> ExpressionParser {
fn new(parser: Parser<'a>) -> ExpressionParser<'a> {
ExpressionParser {
raw_instrs: Vec::new(),
stack: Vec::new(),
Expand Down
2 changes: 1 addition & 1 deletion libs/wast/src/core/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub enum ModuleField<'a> {
}

impl<'a> ModuleField<'a> {
pub(crate) fn parse_remaining(parser: Parser<'a>) -> Result<Vec<ModuleField>> {
pub(crate) fn parse_remaining(parser: Parser<'a>) -> Result<Vec<ModuleField<'a>>> {
let mut fields = Vec::new();
while !parser.is_empty() {
fields.push(parser.parens(ModuleField::parse)?);
Expand Down

0 comments on commit b733d7c

Please sign in to comment.