Skip to content

Commit 75da339

Browse files
committed
Fix clippy, update deps, some code cleanup.
1 parent e6cd4b8 commit 75da339

File tree

8 files changed

+61
-189
lines changed

8 files changed

+61
-189
lines changed

Cargo.lock

+30-158
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
name = "projectm_sdl"
33
version = "0.1.0"
44
edition = "2021"
5+
rust-version = "1.68.2"
56

67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78

89
[dependencies]
910
libc = "*"
10-
sdl2 = "0.35.2"
11+
sdl2 = "0.35"
1112
# projectm-rs = "^1.0.4"
1213
projectm-rs = { git = "https://github.com/projectM-visualizer/projectm-rs" }
13-
clippy = "0.0.302"
1414
# gl = "0.14.0"
1515

1616
[features]

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ RUSTFLAGS="-L$(brew --prefix sdl2)/lib" cargo build
9696
RUSTFLAGS="-L$(brew --prefix sdl2)/lib" cargo run
9797
```
9898

99+
### Optimized build
100+
101+
```
102+
cargo run --release
103+
```
99104

100105
<p align="right">(<a href="#readme-top">back to top</a>)</p>
101106

scripts/clippy.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cargo clippy --all-features --all-targets -- -D warnings

src/app.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use projectm_rs::core::{Projectm, ProjectMHandle};
1+
use projectm_rs::core::{ProjectMHandle, Projectm};
22
use sdl2::video::GLProfile;
33

44
pub mod audio;
@@ -73,11 +73,7 @@ impl App {
7373
playlist,
7474
sdl_context,
7575
window,
76-
config: if let Some(config) = config {
77-
config
78-
} else {
79-
default_config()
80-
},
76+
config: config.unwrap_or_else(default_config),
8177
audio,
8278
_gl_context: gl_context, // keep this around to keep the context alive
8379
}

0 commit comments

Comments
 (0)