Skip to content

Commit 76d86e9

Browse files
committed
refactor(cfg, formatter): remove unnecessary return statements
1 parent c072e01 commit 76d86e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/oxc_cfg/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl ControlFlowGraph {
146146
if unreachable {
147147
Control::Prune
148148
} else if b == to {
149-
return Control::Break(true);
149+
Control::Break(true)
150150
} else {
151151
Control::Continue
152152
}

crates/oxc_formatter/src/write/type_parameters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'a> Format<'a> for FormatTsTypeParameters<'a, '_> {
6464
if self.decl.params().is_empty() && self.options.is_type_or_interface_decl {
6565
write!(f, "<>")
6666
} else if self.decl.params().is_empty() {
67-
return Err(FormatError::SyntaxError);
67+
Err(FormatError::SyntaxError)
6868
} else {
6969
write!(
7070
f,

0 commit comments

Comments
 (0)