Skip to content

Commit c25fa0d

Browse files
committed
Run rustfmt on changed files
1 parent d345041 commit c25fa0d

22 files changed

Lines changed: 151 additions & 204 deletions

crates/buttplug_server/src/device/protocol_impl/galaku.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,7 @@ impl ProtocolInitializer for GalakuInitializer {
118118
if hardware.name() == "AC695X_1(BLE)" {
119119
protocol.is_caiping_pump_device = true;
120120
}
121-
for _ in 0..def
122-
.features()
123-
.values()
124-
.filter(|f| f.has_output())
125-
.count()
126-
{
121+
for _ in 0..def.features().values().filter(|f| f.has_output()).count() {
127122
protocol.speeds.push(AtomicU8::new(0));
128123
}
129124
Ok(Arc::new(protocol))

crates/buttplug_server/src/device/protocol_impl/hismith_mini.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ use crate::device::{
99
protocol::{ProtocolHandler, ProtocolIdentifier, ProtocolInitializer},
1010
};
1111
use async_trait::async_trait;
12-
use buttplug_core::{
13-
errors::ButtplugDeviceError,
14-
message::OutputType,
15-
};
12+
use buttplug_core::{errors::ButtplugDeviceError, message::OutputType};
1613
use buttplug_server_device_config::{
1714
Endpoint,
1815
ProtocolCommunicationSpecifier,

crates/buttplug_server/src/device/protocol_impl/lovehoney_desire.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ impl ProtocolInitializer for LovehoneyDesireInitializer {
4545
def: &ServerDeviceDefinition,
4646
) -> Result<Arc<dyn ProtocolHandler>, ButtplugDeviceError> {
4747
Ok(Arc::new(LovehoneyDesire::new(
48-
def
49-
.features()
50-
.values()
51-
.filter(|x| x.has_output())
52-
.count() as u8,
48+
def.features().values().filter(|x| x.has_output()).count() as u8,
5349
)))
5450
}
5551
}

crates/buttplug_server/src/device/protocol_impl/lovense/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ impl ProtocolInitializer for LovenseInitializer {
172172
let vibrator_count = device_definition
173173
.features()
174174
.values()
175-
.filter(|x| x.contains_output(OutputType::Vibrate) || x.contains_output(OutputType::Oscillate))
175+
.filter(|x| {
176+
x.contains_output(OutputType::Vibrate) || x.contains_output(OutputType::Oscillate)
177+
})
176178
.count();
177179

178180
let output_count = device_definition

crates/buttplug_server/src/device/protocol_impl/magic_motion_v4.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ impl ProtocolInitializer for MagicMotionV4Initializer {
4141
def: &ServerDeviceDefinition,
4242
) -> Result<Arc<dyn ProtocolHandler>, ButtplugDeviceError> {
4343
Ok(Arc::new(MagicMotionV4::new(
44-
def
45-
.features()
46-
.values()
47-
.filter(|x| x.has_output())
48-
.count() as u8,
44+
def.features().values().filter(|x| x.has_output()).count() as u8,
4945
)))
5046
}
5147
}

crates/buttplug_server/src/device/protocol_impl/monsterpub.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ impl ProtocolInitializer for MonsterPubInitializer {
134134
))
135135
.await?;
136136
}
137-
let output_count = def
138-
.features()
139-
.values()
140-
.filter(|x| x.has_output())
141-
.count();
137+
let output_count = def.features().values().filter(|x| x.has_output()).count();
142138

143139
Ok(Arc::new(MonsterPub::new(
144140
if hardware.endpoints().contains(&Endpoint::TxVibrate) {

crates/buttplug_server/src/device/protocol_impl/mysteryvibe.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ impl ProtocolInitializer for MysteryVibeInitializer {
5353
true,
5454
);
5555
hardware.write_value(&msg).await?;
56-
let vibrator_count = def
57-
.features()
58-
.values()
59-
.filter(|x| x.has_output())
60-
.count();
56+
let vibrator_count = def.features().values().filter(|x| x.has_output()).count();
6157
Ok(Arc::new(MysteryVibe::new(vibrator_count as u8)))
6258
}
6359
}

crates/buttplug_server/src/device/protocol_impl/mysteryvibe_v2.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ impl ProtocolInitializer for MysteryVibeV2Initializer {
4949
true,
5050
);
5151
hardware.write_value(&msg).await?;
52-
let vibrator_count = def
53-
.features()
54-
.values()
55-
.filter(|x| x.has_output())
56-
.count();
52+
let vibrator_count = def.features().values().filter(|x| x.has_output()).count();
5753
Ok(Arc::new(MysteryVibe::new(vibrator_count as u8)))
5854
}
5955
}

crates/buttplug_server/src/device/protocol_impl/sensee_v2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
// Licensed under the BSD 3-Clause license. See LICENSE file in the project root
66
// for full license information.
77

8-
use buttplug_core::{
9-
errors::ButtplugDeviceError,
10-
message::OutputType,
11-
};
8+
use buttplug_core::{errors::ButtplugDeviceError, message::OutputType};
129
use buttplug_server_device_config::{
1310
Endpoint,
1411
ProtocolCommunicationSpecifier,

crates/buttplug_server/src/device/protocol_impl/sexverse_v1.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ use std::sync::atomic::{AtomicU8, Ordering};
1111
use async_trait::async_trait;
1212
use uuid::{Uuid, uuid};
1313

14-
use buttplug_core::{
15-
errors::ButtplugDeviceError,
16-
message::OutputType,
17-
};
14+
use buttplug_core::{errors::ButtplugDeviceError, message::OutputType};
1815
use buttplug_server_device_config::{
1916
Endpoint,
2017
ProtocolCommunicationSpecifier,

0 commit comments

Comments
 (0)