Skip to content

Commit 7f70cbd

Browse files
pastaqShadowApex
andauthored
fix: Apply suggestions from code review
Co-authored-by: William Edwards <shadowapex@gmail.com>
1 parent 1d0e46d commit 7f70cbd

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/drivers/horipad_steam/hid_report_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use super::hid_report::PackedInputDataReport;
88
async fn test_horipad_steam() -> Result<(), Box<dyn Error>> {
99
let report = PackedInputDataReport::unpack_from_slice(&DATA_A).unwrap();
1010
println!("{report}");
11-
assert_eq!(report.a, true);
11+
assert!(report.a, "should be pressed");
1212

1313
Ok(())
1414
}

src/drivers/horipad_steam/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub mod driver;
22
pub mod event;
33
pub mod hid_report;
4+
#[cfg(test)]
45
pub mod hid_report_test;
56
pub mod report_descriptor;

src/input/source/hidraw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{
2020
constants::BUS_SOURCES_PREFIX,
2121
drivers,
2222
input::composite_device::client::CompositeDeviceClient,
23-
udev::device::{self, UdevDevice},
23+
udev::device::UdevDevice,
2424
};
2525

2626
use self::{

src/input/source/hidraw/horipad_steam.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
udev::device::UdevDevice,
1414
};
1515

16-
/// XpadUhid source device implementation
16+
/// HoripadSteam source device implementation
1717
pub struct HoripadSteam {
1818
driver: Driver,
1919
}
@@ -45,7 +45,7 @@ impl SourceInputDevice for HoripadSteam {
4545

4646
impl Debug for HoripadSteam {
4747
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
48-
f.debug_struct("XpadUhid").finish()
48+
f.debug_struct("HoripadSteam").finish()
4949
}
5050
}
5151

src/input/source/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use ::evdev::FFEffectData;
99
use thiserror::Error;
1010
use tokio::sync::mpsc::{self, error::TryRecvError};
1111

12-
use crate::udev::device::{self, UdevDevice};
12+
use crate::udev::device::UdevDevice;
1313

1414
use self::{
1515
client::SourceDeviceClient, command::SourceCommand, evdev::EventDevice, hidraw::HidRawDevice,

0 commit comments

Comments
 (0)