mozilla / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
135 stars 40 forks source link

reformat files with cargo fmt #87

Closed vincentfretin closed 2 years ago

vincentfretin commented 2 years ago

@mqp I started reading the Rust book to learn the language properly. I installed the Rust addon in VS Code that format the code with rustfmt / cargo fmt on save. It seems that recent changes to the code weren't formatted with rustfmt or maybe recent rustfmt versions changed default formatting? You tell me. If you want you can merge this PR to fix that. Or just do your own commit to reformat at least src/lib.rs that's the file I will mainly modify. I thought that reformatting the files before doing any new PR with code changes would facilitate the review on future PRs. If you don't merge it, I'll try to not include the formatting changes in future PRs.

I see it adds trailing comma. rustfmt doesn't seem to have a stable option to not add them. I used rustup for my rust installation

rustc --version
rustc 1.53.0 (53cb7b09b 2021-06-17)
rustfmt --version
rustfmt 1.4.37-stable (2a3635d 2021-05-04)
mqp commented 2 years ago

Looks OK, I am in favor of conforming to rustfmt. I don't have it running in my editor at the moment so it makes sense that a few things would not be conforming. Note that I have a rustfmt.toml in the root directory controlling the settings.