Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove thiserror from bevy_gilrs #15773

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/bevy_gilrs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ bevy_time = { path = "../bevy_time", version = "0.15.0-dev" }

# other
gilrs = "0.11.0"
thiserror = "1.0"
derive_more = { version = "1", default-features = false, features = [
"error",
"from",
"display",
] }

[lints]
workspace = true
Expand Down
10 changes: 5 additions & 5 deletions crates/bevy_gilrs/src/rumble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use bevy_utils::{
tracing::{debug, warn},
Duration, HashMap,
};
use derive_more::derive::{Display, Error, From};
use gilrs::{
ff::{self, BaseEffect, BaseEffectType, Repeat, Replay},
GamepadId,
};
use thiserror::Error;

/// A rumble effect that is currently in effect.
struct RunningRumble {
Expand All @@ -27,12 +27,12 @@ struct RunningRumble {
effect: SyncCell<ff::Effect>,
}

#[derive(Error, Debug)]
#[derive(Error, Display, Debug, From)]
enum RumbleError {
#[error("gamepad not found")]
#[display("gamepad not found")]
GamepadNotFound,
#[error("gilrs error while rumbling gamepad: {0}")]
GilrsError(#[from] ff::Error),
#[display("gilrs error while rumbling gamepad: {_0}")]
GilrsError(ff::Error),
}

/// Contains the gilrs rumble effects that are currently running for each gamepad
Expand Down
Loading