Skip to content

Commit cef9ce1

Browse files
committed
Clippy fix
1 parent 9e564e9 commit cef9ce1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

java-spaghetti-gen/src/emit/java_proxy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl Class {
4444
"class {} {} {} {{",
4545
class_name,
4646
parent_type,
47-
self.java.path().as_str().replace('/', ".").replace('$', ".")
47+
self.java.path().as_str().replace(['/', '$'], ".")
4848
)?;
4949

5050
// ptr field
@@ -153,7 +153,7 @@ fn java_type_name(desc: &FieldDescriptor) -> anyhow::Result<String> {
153153
// Convert JNI path to Java path
154154
return Ok(format!(
155155
"{}{}",
156-
path.replace('/', ".").replace('$', "."),
156+
path.replace(['/', '$'], "."),
157157
"[]".repeat(desc.dimensions as usize)
158158
));
159159
}

java-spaghetti-gen/src/util/generated_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn write_generated(context: &emit::Context, path: &impl AsRef<Path>, content
2525
};
2626

2727
// Create content with marker comment at the top
28-
let marker_line = format!("{}{}\n", comment_prefix, MARKER_COMMENT);
28+
let marker_line = format!("{comment_prefix}{MARKER_COMMENT}\n");
2929
let full_contents = [marker_line.as_bytes(), contents].concat();
3030

3131
match File::open(path) {

0 commit comments

Comments
 (0)