Skip to content

Commit

Permalink
fix let-else formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed Jul 2, 2023
1 parent e3c5ba7 commit d8eb286
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/internal/syntax/parser/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ impl<'src> Parser<'src> {

'assign: {
if self.no_indent().is_ok() {
let Some(kind) = self.assign_kind() else { break 'assign };
let Some(kind) = self.assign_kind() else {
break 'assign;
};
let error_span = target.span.start..self.previous().span.end;
self.no_indent()?;
let value = self.expr()?;
Expand Down
2 changes: 1 addition & 1 deletion src/internal/vm/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ impl Handler for Thread {
let value = self.get_register(reg.offset(1));

let Some(key) = key.clone().to_any().and_then(|v| v.cast::<Str>().ok()) else {
fail!( "`{key}` is not a string");
fail!("`{key}` is not a string");
};

table.insert(key, value);
Expand Down

0 comments on commit d8eb286

Please sign in to comment.