Skip to content

Commit d059d2e

Browse files
committed
remove double borrow
1 parent 0334188 commit d059d2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/oxc_linter/src/rules/typescript/no_empty_object_type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ fn check_interface_declaration(
204204
if allow_interfaces == AllowInterfaces::Always {
205205
return;
206206
}
207-
if let Some(pattern) = allow_with_name.as_ref()
207+
if let Some(pattern) = allow_with_name
208208
&& pattern.is_match(interface.id.name.as_str())
209209
{
210210
return;
@@ -232,7 +232,7 @@ fn check_type_literal(
232232
match ctx.nodes().parent_kind(node_id) {
233233
AstKind::TSIntersectionType(_) => return,
234234
AstKind::TSTypeAliasDeclaration(alias) => {
235-
if let Some(pattern) = allow_with_name.as_ref()
235+
if let Some(pattern) = allow_with_name
236236
&& pattern.is_match(alias.id.name.as_str())
237237
{
238238
return;

0 commit comments

Comments
 (0)