Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jun 22, 2024
1 parent 379abb3 commit ea40e59
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ repos:
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: [--ignore-words=.codespellignore]
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.28.2
rev: 0.28.5
hooks:
- id: check-github-actions
- id: check-github-workflows
Expand Down Expand Up @@ -74,7 +74,7 @@ repos:
- yaml
# https://reuse.software
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
rev: v3.1.0a1
hooks:
- id: reuse
- repo: local
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ edition = "2021"
include = ["README.md", "LICENSES", "src/"]

[dependencies]
anyhow = "1.0.83"
derive_more = "0.99.17"
anyhow = "1.0.86"
derive_more = "0.99.18"
float-cmp = "0.9.0"
futures-core = { version = "0.3.30", default-features = false }
futures-util = { version = "0.3.30", default-features = false, features = [
Expand All @@ -27,23 +27,23 @@ futures-util = { version = "0.3.30", default-features = false, features = [
is_sorted = "0.1.1"
log = "0.4.21"
strum = { version = "0.26.2", features = ["derive"] }
thiserror = "1.0.60"
thiserror = "1.0.61"

# Optional dependencies
discro = { version = "0.29.2", optional = true }
discro = { version = "0.29.3", optional = true }
midir = { version = "0.10.0", optional = true }
tokio = { version = "1.37.0", default-features = false, optional = true }
tokio = { version = "1.38.0", default-features = false, optional = true }

# Optional dependencies (experimental features)
crossbeam-utils = { version = "0.8.19", optional = true }
crossbeam-utils = { version = "0.8.20", optional = true }
enum-as-inner = { version = "0.6.0", optional = true }

# Target dependent dependencies
[target.'cfg(not(target_family = "wasm"))'.dependencies]
hidapi = { version = "2.6.1", optional = true }

[dev-dependencies]
anyhow = "1.0.83"
anyhow = "1.0.86"
hidapi = "2.6.1"
pretty_env_logger = "0.5.0"

Expand Down
4 changes: 2 additions & 2 deletions src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ impl SliderInput {

#[must_use]
pub fn clamp_position(position: f32) -> f32 {
position.max(Self::MIN_POSITION).min(Self::MAX_POSITION)
position.clamp(Self::MIN_POSITION, Self::MAX_POSITION)
}

#[must_use]
Expand Down Expand Up @@ -211,7 +211,7 @@ impl CenterSliderInput {

#[must_use]
pub fn clamp_position(position: f32) -> f32 {
position.max(Self::MIN_POSITION).min(Self::MAX_POSITION)
position.clamp(Self::MIN_POSITION, Self::MAX_POSITION)
}

#[must_use]
Expand Down

0 comments on commit ea40e59

Please sign in to comment.