Skip to content

Commit 6e65e2c

Browse files
committed
Pass in attribute
1 parent 2e6b805 commit 6e65e2c

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

compiler-cli/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
clippy::match_single_binding,
5151
clippy::inconsistent_struct_constructor,
5252
clippy::assign_op_pattern,
53-
clippy::len_without_is_empty
53+
clippy::len_without_is_empty,
54+
clippy::let_unit_value
5455
)]
5556

5657
#[cfg(test)]

compiler-core/src/erlang.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3265,7 +3265,7 @@ fn how_to_divide(left: &TypedExpr, right: &TypedExpr) -> HowToDivide {
32653265
pub fn record_definition(record_name: &str, fields: &[(&str, Arc<Type>)]) -> String {
32663266
let mut builder = ErlangSourceBuilder::new(None);
32673267

3268-
builder.start_record_attribute(&to_snake_case(record_name));
3268+
let attribute = builder.start_record_attribute(&to_snake_case(record_name));
32693269

32703270
let type_printer = TypeGenerator::new("").var_as_any();
32713271
for (field_name, field_type) in fields {
@@ -3274,7 +3274,7 @@ pub fn record_definition(record_name: &str, fields: &[(&str, Arc<Type>)]) -> Str
32743274
type_printer.type_(&mut builder, field_type);
32753275
}
32763276

3277-
builder.end_record_attribute(());
3277+
builder.end_record_attribute(attribute);
32783278
builder.into_output()
32793279
}
32803280

compiler-core/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
clippy::match_like_matches_macro,
5757
clippy::inconsistent_struct_constructor,
5858
clippy::len_without_is_empty,
59+
clippy::let_unit_value,
5960
// TODO: fix
6061
clippy::arc_with_non_send_sync,
6162
)]

language-server/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
clippy::match_single_binding,
5353
clippy::match_like_matches_macro,
5454
clippy::inconsistent_struct_constructor,
55-
clippy::len_without_is_empty
55+
clippy::len_without_is_empty,
56+
clippy::let_unit_value
5657
)]
5758

5859
mod code_action;

0 commit comments

Comments
 (0)