Skip to content

Commit 5912903

Browse files
committed
Fix formatting in kotlin.rs
1 parent 63aafbb commit 5912903

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

core/src/language/kotlin.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl Language for Kotlin {
140140
false,
141141
match ty.is_redacted {
142142
true => Visibility::Private,
143-
false => Visibility::Public
143+
false => Visibility::Public,
144144
},
145145
)?;
146146

@@ -202,10 +202,22 @@ impl Language for Kotlin {
202202

203203
if let Some((last, elements)) = rs.fields.split_last() {
204204
for f in elements.iter() {
205-
self.write_element(w, f, rs.generic_types.as_slice(), requires_serial_name, Visibility::Public)?;
205+
self.write_element(
206+
w,
207+
f,
208+
rs.generic_types.as_slice(),
209+
requires_serial_name,
210+
Visibility::Public,
211+
)?;
206212
writeln!(w, ",")?;
207213
}
208-
self.write_element(w, last, rs.generic_types.as_slice(), requires_serial_name, Visibility::Public)?;
214+
self.write_element(
215+
w,
216+
last,
217+
rs.generic_types.as_slice(),
218+
requires_serial_name,
219+
Visibility::Public,
220+
)?;
209221
writeln!(w)?;
210222
}
211223

@@ -283,7 +295,7 @@ impl Language for Kotlin {
283295

284296
enum Visibility {
285297
Public,
286-
Private
298+
Private,
287299
}
288300

289301
impl Kotlin {
@@ -446,7 +458,7 @@ impl Kotlin {
446458
.then_some("? = null")
447459
.or_else(|| f.ty.is_optional().then_some(" = null"))
448460
.unwrap_or_default()
449-
)
461+
),
450462
}
451463
}
452464

0 commit comments

Comments
 (0)