mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
Remove thiserror
from bevy_gilrs
(#15773)
# Objective - Contributes to #15460 ## Solution - Removed `thiserror` from `bevy_gilrs`
This commit is contained in:
parent
0a61f04d9b
commit
c6a2411e90
2 changed files with 10 additions and 6 deletions
|
@ -18,7 +18,11 @@ bevy_time = { path = "../bevy_time", version = "0.15.0-dev" }
|
||||||
|
|
||||||
# other
|
# other
|
||||||
gilrs = "0.11.0"
|
gilrs = "0.11.0"
|
||||||
thiserror = "1.0"
|
derive_more = { version = "1", default-features = false, features = [
|
||||||
|
"error",
|
||||||
|
"from",
|
||||||
|
"display",
|
||||||
|
] }
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
@ -10,11 +10,11 @@ use bevy_utils::{
|
||||||
tracing::{debug, warn},
|
tracing::{debug, warn},
|
||||||
Duration, HashMap,
|
Duration, HashMap,
|
||||||
};
|
};
|
||||||
|
use derive_more::derive::{Display, Error, From};
|
||||||
use gilrs::{
|
use gilrs::{
|
||||||
ff::{self, BaseEffect, BaseEffectType, Repeat, Replay},
|
ff::{self, BaseEffect, BaseEffectType, Repeat, Replay},
|
||||||
GamepadId,
|
GamepadId,
|
||||||
};
|
};
|
||||||
use thiserror::Error;
|
|
||||||
|
|
||||||
/// A rumble effect that is currently in effect.
|
/// A rumble effect that is currently in effect.
|
||||||
struct RunningRumble {
|
struct RunningRumble {
|
||||||
|
@ -27,12 +27,12 @@ struct RunningRumble {
|
||||||
effect: SyncCell<ff::Effect>,
|
effect: SyncCell<ff::Effect>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Display, Debug, From)]
|
||||||
enum RumbleError {
|
enum RumbleError {
|
||||||
#[error("gamepad not found")]
|
#[display("gamepad not found")]
|
||||||
GamepadNotFound,
|
GamepadNotFound,
|
||||||
#[error("gilrs error while rumbling gamepad: {0}")]
|
#[display("gilrs error while rumbling gamepad: {_0}")]
|
||||||
GilrsError(#[from] ff::Error),
|
GilrsError(ff::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Contains the gilrs rumble effects that are currently running for each gamepad
|
/// Contains the gilrs rumble effects that are currently running for each gamepad
|
||||||
|
|
Loading…
Reference in a new issue