Skip to content

Commit fb72262

Browse files
blackspherefollowerqdot
authored andcommitted
chore: cargo fmt
1 parent 0ca06db commit fb72262

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

buttplug/src/server/device/protocol/hismith.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// for full license information.
77

88
use crate::server::device::configuration::ProtocolCommunicationSpecifier;
9+
use crate::server::device::protocol::hismith_mini::HismithMiniInitializer;
910
use crate::{
1011
core::{errors::ButtplugDeviceError, message::Endpoint},
1112
server::device::{
@@ -16,7 +17,6 @@ use crate::{
1617
};
1718
use async_trait::async_trait;
1819
use std::sync::Arc;
19-
use crate::server::device::protocol::hismith_mini::HismithMiniInitializer;
2020

2121
pub mod setup {
2222
use crate::server::device::protocol::{ProtocolIdentifier, ProtocolIdentifierFactory};

buttplug/src/server/device/protocol/lelof1sv2.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ impl ProtocolInitializer for LeloF1sV2Initializer {
4343
hardware: Arc<Hardware>,
4444
_: &UserDeviceDefinition,
4545
) -> Result<Arc<dyn ProtocolHandler>, ButtplugDeviceError> {
46-
47-
let use_harmony= !hardware.endpoints().contains(&Endpoint::Whitelist);
48-
let sec_endpoint = if use_harmony { Endpoint::Generic0 } else { Endpoint::Whitelist };
49-
46+
let use_harmony = !hardware.endpoints().contains(&Endpoint::Whitelist);
47+
let sec_endpoint = if use_harmony {
48+
Endpoint::Generic0
49+
} else {
50+
Endpoint::Whitelist
51+
};
52+
5053
// The Lelo F1s V2 has a very specific pairing flow:
5154
// * First the device is turned on in BLE mode (long press)
5255
// * Then the security endpoint (Whitelist) needs to be read (which we can do via subscribe)
@@ -100,7 +103,7 @@ impl ProtocolInitializer for LeloF1sV2Initializer {
100103
}
101104

102105
pub struct LeloF1sV2 {
103-
use_harmony: bool
106+
use_harmony: bool,
104107
}
105108

106109
impl LeloF1sV2 {
@@ -122,8 +125,7 @@ impl ProtocolHandler for LeloF1sV2 {
122125
&self,
123126
cmds: &[Option<(ActuatorType, u32)>],
124127
) -> Result<Vec<HardwareCommand>, ButtplugDeviceError> {
125-
if self.use_harmony
126-
{
128+
if self.use_harmony {
127129
let mut cmd_vec: Vec<HardwareCommand> = vec![];
128130
for (i, cmd) in cmds.iter().enumerate() {
129131
if let Some(pair) = cmd {
@@ -144,7 +146,7 @@ impl ProtocolHandler for LeloF1sV2 {
144146
],
145147
false,
146148
)
147-
.into(),
149+
.into(),
148150
);
149151
}
150152
}

buttplug/src/server/device/protocol/svakom_barney.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl ProtocolHandler for SvakomBarney {
5050
mode = 3;
5151
}
5252
let speed = (scalar as f64 / 3.0).ceil() as u8;*/
53-
53+
5454
Ok(vec![HardwareWriteCmd::new(
5555
Endpoint::Tx,
5656
[

0 commit comments

Comments
 (0)