Skip to content

[Rust] Format example with rustfmt#7339

Merged
wing328 merged 1 commit intoswagger-api:2.4.0from
euank:fmtting
Jan 14, 2018
Merged

[Rust] Format example with rustfmt#7339
wing328 merged 1 commit intoswagger-api:2.4.0from
euank:fmtting

Conversation

@euank
Copy link
Copy Markdown
Contributor

@euank euank commented Jan 8, 2018

This was handled via 'cargo fmt' on the current nightly rust. I also
moved a few lines around and deleted an old comment.

PR checklist

Description of the PR

Since #7335 merged, this updates the example to match that style in the sample example.

I'll go through and update the style in more places once I don't have other PRs which would merge-conflict in flight.

cc @frol @farcaller @bjgill

This was handled via 'cargo fmt' on the current nightly rust. I also
moved a few lines around and deleted an old comment.
@frol
Copy link
Copy Markdown
Contributor

frol commented Jan 8, 2018

LGTM

@bjgill
Copy link
Copy Markdown
Contributor

bjgill commented Jan 9, 2018

Nice. Do you not need to update the mustache template that generates this, instead, though?

@euank
Copy link
Copy Markdown
Contributor Author

euank commented Jan 9, 2018

@bjgill the 'examples' folder isn't generated from mustache templates; it only lives in that location as far as I can tell.

I would like to update the moustache template's style too, but I'm trying to avoid merge conflicts by doing that after the other in-flight PRs I have land.

@wing328 wing328 changed the base branch from master to 2.4.0 January 14, 2018 09:53
@wing328 wing328 added this to the v2.4.0 milestone Jan 14, 2018
@wing328 wing328 merged commit 3029b7b into swagger-api:2.4.0 Jan 14, 2018
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Jan 14, 2018

@euank thanks for the PR, which has been merged into 2.4.0.

What about running "cargo fmt" automatically in the output folder after generating the Rust code?

@euank
Copy link
Copy Markdown
Contributor Author

euank commented Jan 14, 2018

@wing328 I like that idea, but I assumed that depending on cargo would be an issue. I noticed that the go generated client doesn't meet gofmt standards and gofmt isn't automatically run, so I sorta assumed rust shouldn't be calling tools like that either.

@euank euank deleted the fmtting branch January 14, 2018 19:39
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Jan 20, 2018

@euank I've some ideas. Will try to implement one later and collect feedback from you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants