Skip to content

Commit

Permalink
fix: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: William Edwards <[email protected]>
  • Loading branch information
pastaq and ShadowApex authored Jan 22, 2025
1 parent 1d0e46d commit 7f70cbd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/drivers/horipad_steam/hid_report_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::hid_report::PackedInputDataReport;
async fn test_horipad_steam() -> Result<(), Box<dyn Error>> {
let report = PackedInputDataReport::unpack_from_slice(&DATA_A).unwrap();
println!("{report}");
assert_eq!(report.a, true);
assert!(report.a, "should be pressed");

Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions src/drivers/horipad_steam/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod driver;
pub mod event;
pub mod hid_report;
#[cfg(test)]
pub mod hid_report_test;
pub mod report_descriptor;
2 changes: 1 addition & 1 deletion src/input/source/hidraw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
constants::BUS_SOURCES_PREFIX,
drivers,
input::composite_device::client::CompositeDeviceClient,
udev::device::{self, UdevDevice},
udev::device::UdevDevice,
};

use self::{
Expand Down
4 changes: 2 additions & 2 deletions src/input/source/hidraw/horipad_steam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
udev::device::UdevDevice,
};

/// XpadUhid source device implementation
/// HoripadSteam source device implementation
pub struct HoripadSteam {
driver: Driver,
}
Expand Down Expand Up @@ -45,7 +45,7 @@ impl SourceInputDevice for HoripadSteam {

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

Expand Down
2 changes: 1 addition & 1 deletion src/input/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ::evdev::FFEffectData;
use thiserror::Error;
use tokio::sync::mpsc::{self, error::TryRecvError};

use crate::udev::device::{self, UdevDevice};
use crate::udev::device::UdevDevice;

use self::{
client::SourceDeviceClient, command::SourceCommand, evdev::EventDevice, hidraw::HidRawDevice,
Expand Down

0 comments on commit 7f70cbd

Please sign in to comment.