Skip to content

Commit

Permalink
Fix clippy lints after update
Browse files Browse the repository at this point in the history
  • Loading branch information
Schottkyc137 committed Sep 21, 2024
1 parent 098c1c7 commit b06da00
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
5 changes: 1 addition & 4 deletions vhdl_lang/src/analysis/design_unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,7 @@ impl<'a, 't> AnalyzeContext<'a, 't> {
&ent_name_span.pos(self.ctx),
&designator.item,
)
.map(|design| {
designator.set_unique_reference(design.into());
design
})?),
.inspect(|design| designator.set_unique_reference(design.0))?),

// configuration cfg of lib.ent
Name::Selected(ref mut prefix, ref mut designator) => {
Expand Down
8 changes: 2 additions & 6 deletions vhdl_lang/src/analysis/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1481,12 +1481,8 @@ impl<'a, 't> AnalyzeContext<'a, 't> {
designator.pos(self.ctx),
&designator.item.item,
)
.map(|design| {
designator
.item
.reference
.set_unique_reference(design.into());
design
.inspect(|design| {
designator.item.reference.set_unique_reference(design.0)
})?,
);
} else {
Expand Down
5 changes: 1 addition & 4 deletions vhdl_lang/src/syntax/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,7 @@ fn parse_expr(
/// 8. misc_operator: ** | abs | not
pub fn parse_expression(ctx: &mut ParsingContext<'_>) -> ParseResult<WithTokenSpan<Expression>> {
let state = ctx.stream.state();
parse_expr(ctx, 0).map_err(|err| {
ctx.stream.set_state(state);
err
})
parse_expr(ctx, 0).inspect_err(|_| ctx.stream.set_state(state))
}

#[cfg(test)]
Expand Down
5 changes: 1 addition & 4 deletions vhdl_lang/src/syntax/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,7 @@ pub fn into_range(assoc: AssociationElement) -> Result<ast::Range, AssociationEl

pub fn parse_name(ctx: &mut ParsingContext<'_>) -> ParseResult<WithTokenSpan<Name>> {
let state = ctx.stream.state();
_parse_name(ctx).map_err(|err| {
ctx.stream.set_state(state);
err
})
_parse_name(ctx).inspect_err(|_| ctx.stream.set_state(state))
}

#[cfg(test)]
Expand Down

0 comments on commit b06da00

Please sign in to comment.