Skip to content

Commit 08c86f3

Browse files
clippy!!
1 parent 76f3f89 commit 08c86f3

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

compiler-core/src/erlang.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl<'a> Generator<'a> {
314314
// In that case all type variables are phantom type variables!
315315
([], _) if let Some((module, type_name, _)) = external_erlang => {
316316
let type_ =
317-
builder.start_remote_named_type(ErlangModuleName::new(&module), type_name);
317+
builder.start_remote_named_type(ErlangModuleName::new(module), type_name);
318318
for type_variable in phantom_type_variables {
319319
builder.type_variable(&type_variable);
320320
}
@@ -637,7 +637,7 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
637637
let open_function =
638638
builder.start_function(&function_name, arity, arguments.clone());
639639
let call = builder
640-
.start_remote_call(ErlangModuleName::new(&module), external_function_name);
640+
.start_remote_call(ErlangModuleName::new(module), external_function_name);
641641
for argument in arguments {
642642
builder.variable(&argument);
643643
}
@@ -957,14 +957,14 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
957957
..
958958
} => match type_::collapse_links(type_.clone()).as_ref() {
959959
Type::Fn { arguments, .. } => builder.function_reference(
960-
Some(ErlangModuleName::new(&module)),
960+
Some(ErlangModuleName::new(module)),
961961
escape_erlang_existing_name(name),
962962
arguments.len(),
963963
),
964964

965965
Type::Named { .. } | Type::Var { .. } | Type::Tuple { .. } => {
966966
let name = escape_erlang_existing_name(name);
967-
let call = builder.start_remote_call(ErlangModuleName::new(&module), name);
967+
let call = builder.start_remote_call(ErlangModuleName::new(module), name);
968968
builder.end_call(call);
969969
}
970970
},
@@ -1962,7 +1962,7 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
19621962
if *module == self.module_generator.module.name {
19631963
builder.function_reference(None, name, *arity)
19641964
} else {
1965-
builder.function_reference(Some(ErlangModuleName::new(&module)), name, *arity)
1965+
builder.function_reference(Some(ErlangModuleName::new(module)), name, *arity)
19661966
}
19671967
}
19681968

@@ -1978,7 +1978,7 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
19781978
name,
19791979
..
19801980
} => builder.function_reference(
1981-
Some(ErlangModuleName::new(&module)),
1981+
Some(ErlangModuleName::new(module)),
19821982
escape_erlang_existing_name(name),
19831983
*arity,
19841984
),
@@ -2001,7 +2001,7 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
20012001
FunctionCall::Call { module, name } => {
20022002
let call = if module != self.module_generator.module.name {
20032003
builder.start_remote_call(
2004-
ErlangModuleName::new(&module),
2004+
ErlangModuleName::new(module),
20052005
escape_erlang_existing_name(name),
20062006
)
20072007
} else {
@@ -2056,7 +2056,7 @@ impl<'a, 'generator> FunctionGenerator<'a, 'generator> {
20562056
FunctionCall::Call { module, name } => {
20572057
let call = if module != self.module_generator.module.name {
20582058
builder.start_remote_call(
2059-
ErlangModuleName::new(&module),
2059+
ErlangModuleName::new(module),
20602060
escape_erlang_existing_name(name),
20612061
)
20622062
} else {

erlang-generation/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,7 @@ impl ErlangSourceBuilder {
26472647
}
26482648
// We were expecting an expression and someone generated it, we can
26492649
// now pop this off the stack.
2650-
ErlangSourceBuilderPosition::UnaryOperator { .. } => {
2650+
ErlangSourceBuilderPosition::UnaryOperator => {
26512651
self.position.pop();
26522652
}
26532653

@@ -2766,7 +2766,7 @@ impl ErlangSourceBuilder {
27662766
| ErlangSourceBuilderPosition::FunctionStatement { .. }
27672767
| ErlangSourceBuilderPosition::AnonymousFunctionStatement { .. }
27682768
| ErlangSourceBuilderPosition::DocAttribute
2769-
| ErlangSourceBuilderPosition::UnaryOperator { .. }
2769+
| ErlangSourceBuilderPosition::UnaryOperator
27702770
| ErlangSourceBuilderPosition::Case { .. }
27712771
| ErlangSourceBuilderPosition::BinaryOperator { .. }
27722772
| ErlangSourceBuilderPosition::CaseClause { .. }
@@ -2888,7 +2888,7 @@ impl ErlangSourceBuilder {
28882888
},
28892889
..
28902890
}
2891-
| ErlangSourceBuilderPosition::UnaryOperator { .. }
2891+
| ErlangSourceBuilderPosition::UnaryOperator
28922892
| ErlangSourceBuilderPosition::BinaryOperator { .. }
28932893
| ErlangSourceBuilderPosition::Case { .. }
28942894
| ErlangSourceBuilderPosition::Map { .. }
@@ -3069,7 +3069,7 @@ impl ErlangSourceBuilder {
30693069
ErlangSourceBuilderPosition::MapField { .. }
30703070
| ErlangSourceBuilderPosition::RecordField { .. }
30713071
| ErlangSourceBuilderPosition::MatchPattern { .. }
3072-
| ErlangSourceBuilderPosition::UnaryOperator { .. }
3072+
| ErlangSourceBuilderPosition::UnaryOperator
30733073
| ErlangSourceBuilderPosition::List { .. }
30743074
| ErlangSourceBuilderPosition::BinaryOperator { .. }
30753075
| ErlangSourceBuilderPosition::MatchOperator { .. }
@@ -3136,7 +3136,7 @@ impl ErlangSourceBuilder {
31363136
| ErlangSourceBuilderPosition::FunctionStatement { .. }
31373137
| ErlangSourceBuilderPosition::AnonymousFunctionStatement { .. }
31383138
| ErlangSourceBuilderPosition::List { .. }
3139-
| ErlangSourceBuilderPosition::UnaryOperator { .. }
3139+
| ErlangSourceBuilderPosition::UnaryOperator
31403140
| ErlangSourceBuilderPosition::Tuple { .. }
31413141
| ErlangSourceBuilderPosition::TuplePattern { .. }
31423142
| ErlangSourceBuilderPosition::BitArray { .. }
@@ -3427,7 +3427,7 @@ impl ErlangSourceBuilder {
34273427
| ErlangSourceBuilderPosition::BitArray { .. }
34283428
| ErlangSourceBuilderPosition::Map { .. }
34293429
| ErlangSourceBuilderPosition::Block { .. }
3430-
| ErlangSourceBuilderPosition::UnaryOperator { .. }
3430+
| ErlangSourceBuilderPosition::UnaryOperator
34313431
| ErlangSourceBuilderPosition::FunctionType {
34323432
expected:
34333433
ExpectedFunctionTypeItem::Arguments { .. } | ExpectedFunctionTypeItem::ReturnType,

0 commit comments

Comments
 (0)