Skip to content

Commit e434ebe

Browse files
committed
rust: correct formatting to be more consistent with existing code
1 parent 1bfa1a1 commit e434ebe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/template.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub(crate) fn env() -> Result<minijinja::Environment<'static>, minijinja::Error>
2323

2424
let prefix = match &*style {
2525
"python" => {
26-
return Ok(format!(r#""""{}""""#, s));
26+
return Ok(format!(r#""""{s}""""#));
2727
}
2828
"java" | "kotlin" | "javascript" | "js" | "ts" | "typescript" => {
2929
if !s.contains("\n") {

Diff for: src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ impl FieldType {
139139
Self::SchemaRef(name) => name.clone().into(),
140140
}
141141
}
142+
142143
fn to_python_typename(&self) -> Cow<'_, str> {
143144
match self {
144145
FieldType::Bool => "bool".into(),
@@ -149,7 +150,7 @@ impl FieldType {
149150
format!("t.List[{}]", field_type.to_python_typename()).into()
150151
}
151152

152-
FieldType::SchemaRef(name) => format!("models.{}", name).into(),
153+
FieldType::SchemaRef(name) => format!("models.{name}").into(),
153154
}
154155
}
155156
}
@@ -170,7 +171,6 @@ impl minijinja::value::Object for FieldType {
170171
ensure_no_args(args, "to_python")?;
171172
Ok(self.to_python_typename().into())
172173
}
173-
174174
"to_csharp" => {
175175
ensure_no_args(args, "to_csharp")?;
176176
Ok(self.to_csharp_typename().into())

0 commit comments

Comments
 (0)