diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9a713c5f..b73e1ed0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,6 +31,8 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Build + run: cargo fmt --all --check -- --color=always - name: Build run: cargo build --verbose - name: Run tests diff --git a/src/frontend.rs b/src/frontend.rs index 55ccd9b4..cd726e57 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -276,7 +276,7 @@ fn launch_table( let mut cmd = std::process::Command::new(vpinball_executable); if fullscreen { cmd.arg("-EnableTrueFullscreen"); - }else{ + } else { cmd.arg("-DisableTrueFullscreen"); } cmd.arg("-play"); diff --git a/src/jsonmodel.rs b/src/jsonmodel.rs index 44a66ed2..8bfbe923 100644 --- a/src/jsonmodel.rs +++ b/src/jsonmodel.rs @@ -38,7 +38,6 @@ pub fn collection_json(collection: &Collection) -> serde_json::Value { } pub fn collections_json(collections: &[Collection]) -> serde_json::Value { - let collections: Vec = - collections.iter().map(collection_json).collect(); + let collections: Vec = collections.iter().map(collection_json).collect(); json!({ "collections": collections }) } diff --git a/src/vpx/gameitem/lightcenter.rs b/src/vpx/gameitem/lightcenter.rs index 1cc6715e..f2639f09 100644 --- a/src/vpx/gameitem/lightcenter.rs +++ b/src/vpx/gameitem/lightcenter.rs @@ -1,4 +1,4 @@ -use crate::vpx::biff::{BiffRead, BiffReader, self}; +use crate::vpx::biff::{self, BiffRead, BiffReader}; #[derive(Debug, PartialEq)] pub struct LightCenter { diff --git a/src/vpx/gameitem/table.rs b/src/vpx/gameitem/table.rs index 1251dae4..b8d9b27b 100644 --- a/src/vpx/gameitem/table.rs +++ b/src/vpx/gameitem/table.rs @@ -1,4 +1,4 @@ -use crate::vpx::biff::{BiffRead, BiffReader, self}; +use crate::vpx::biff::{self, BiffRead, BiffReader}; #[derive(Debug, PartialEq)] pub struct Table { diff --git a/src/vpx/mod.rs b/src/vpx/mod.rs index e848ee17..fa59b265 100644 --- a/src/vpx/mod.rs +++ b/src/vpx/mod.rs @@ -35,10 +35,10 @@ pub mod font; pub mod gamedata; pub mod gameitem; pub mod image; +pub mod model; pub mod sound; pub mod tableinfo; pub mod version; -pub mod model; pub struct VPX { custominfotags: custominfotags::CustomInfoTags, // this is a bit redundant diff --git a/src/vpx/model.rs b/src/vpx/model.rs index 698ced46..40b46994 100644 --- a/src/vpx/model.rs +++ b/src/vpx/model.rs @@ -32,4 +32,4 @@ impl StringWithEncoding { string: String::new(), } } -} \ No newline at end of file +} diff --git a/src/vpx/version.rs b/src/vpx/version.rs index 5bf91daf..458536f6 100644 --- a/src/vpx/version.rs +++ b/src/vpx/version.rs @@ -1,7 +1,7 @@ use std::{ cmp, fmt::Display, - io::{Read, Seek, Write, self}, + io::{self, Read, Seek, Write}, path::{Path, MAIN_SEPARATOR_STR}, };