Skip to content

Commit

Permalink
fix: indentation in impl Default
Browse files Browse the repository at this point in the history
  • Loading branch information
DDtKey committed Feb 21, 2024
1 parent a65bb9b commit aabda23
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ impl Default for {{classname}} {
{{{name}}}: Default::default(),
{{/vars}}
}{{/-first}}{{/mappedModels}}
{{/oneOf}}
{{^oneOf.isEmpty}}
{{#mappedModels}}{{#-first}}Self::{{{modelName}}}(Box::default()){{/-first}}{{/mappedModels}}
{{^mappedModels}}{{#composedSchemas.oneOf}}{{#-first}}Self::{{{name}}}(Box::default()){{/-first}}{{/composedSchemas.oneOf}}{{/mappedModels}}
{{/oneOf.isEmpty}}
{{/oneOf}}{{^oneOf.isEmpty}}{{#mappedModels}}{{#-first}}Self::{{{modelName}}}(Box::default()){{/-first}}{{/mappedModels}}{{^mappedModels}}{{#composedSchemas.oneOf}}{{#-first}}Self::{{{name}}}(Box::default()){{/-first}}{{/composedSchemas.oneOf}}{{/mappedModels}}{{/oneOf.isEmpty}}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum CreateStateRequest {

impl Default for CreateStateRequest {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pub enum CustomOneOfArraySchemaInner {

impl Default for CustomOneOfArraySchemaInner {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum CustomOneOfSchema {

impl Default for CustomOneOfSchema {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pub enum GetState200Response {

impl Default for GetState200Response {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl Default for Entity {
at_schema_location: Default::default(),
at_base_type: Default::default(),
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl Default for EntityRef {
at_schema_location: Default::default(),
at_base_type: Default::default(),
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub enum FooRefOrValue {

impl Default for FooRefOrValue {
fn default() -> Self {

Self::Foo(Box::default())
}
}
Expand Down
3 changes: 1 addition & 2 deletions samples/client/others/rust/hyper/oneOf/src/models/fruit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum Fruit {

impl Default for Fruit {
fn default() -> Self {
Self::Apple(Box::default())

Self::Apple(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum CreateStateRequest {

impl Default for CreateStateRequest {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pub enum CustomOneOfArraySchemaInner {

impl Default for CustomOneOfArraySchemaInner {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum CustomOneOfSchema {

impl Default for CustomOneOfSchema {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pub enum GetState200Response {

impl Default for GetState200Response {
fn default() -> Self {
Self::ObjA(Box::default())

Self::ObjA(Box::default())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl Default for Entity {
at_schema_location: Default::default(),
at_base_type: Default::default(),
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl Default for EntityRef {
at_schema_location: Default::default(),
at_base_type: Default::default(),
}

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub enum FooRefOrValue {

impl Default for FooRefOrValue {
fn default() -> Self {

Self::Foo(Box::default())
}
}
Expand Down
3 changes: 1 addition & 2 deletions samples/client/others/rust/reqwest/oneOf/src/models/fruit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ pub enum Fruit {

impl Default for Fruit {
fn default() -> Self {
Self::Apple(Box::default())

Self::Apple(Box::default())
}
}

Expand Down

0 comments on commit aabda23

Please sign in to comment.