style: cargo fmt --all under rustfmt 1.9 (Rust 1.96)
Comment reflow only — the pinned "stable" channel moved and CI checks formatting with the current toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -274,7 +274,10 @@ fn discover(secs: u64) -> Result<()> {
|
||||
let receiver = daemon
|
||||
.browse("_punktfunk._udp.local.")
|
||||
.context("browse _punktfunk._udp")?;
|
||||
tracing::info!(secs, "browsing for native punktfunk/1 hosts (_punktfunk._udp)…");
|
||||
tracing::info!(
|
||||
secs,
|
||||
"browsing for native punktfunk/1 hosts (_punktfunk._udp)…"
|
||||
);
|
||||
// One row per host, keyed by the stable uniqueid (falls back to the fullname) so the same
|
||||
// host re-advertising or answering on several interfaces collapses to a single entry.
|
||||
let mut hosts: BTreeMap<String, String> = BTreeMap::new();
|
||||
@@ -298,7 +301,12 @@ fn discover(secs: u64) -> Result<()> {
|
||||
.unwrap_or_else(|| "?".into());
|
||||
let fp = val("fp");
|
||||
let fp_short = fp.get(..16).unwrap_or(fp.as_str());
|
||||
let name = info.get_fullname().split('.').next().unwrap_or("?").to_string();
|
||||
let name = info
|
||||
.get_fullname()
|
||||
.split('.')
|
||||
.next()
|
||||
.unwrap_or("?")
|
||||
.to_string();
|
||||
let id = val("id");
|
||||
let key = if id.is_empty() {
|
||||
info.get_fullname().to_string()
|
||||
@@ -490,7 +498,10 @@ async fn session(args: Args) -> Result<()> {
|
||||
} else {
|
||||
0
|
||||
};
|
||||
let throughput_kbps = recv_bytes.saturating_mul(8).checked_div(window_ms).unwrap_or(0);
|
||||
let throughput_kbps = recv_bytes
|
||||
.saturating_mul(8)
|
||||
.checked_div(window_ms)
|
||||
.unwrap_or(0);
|
||||
let loss_pct = if res.bytes_sent > 0 {
|
||||
res.bytes_sent.saturating_sub(recv_bytes) as f64 / res.bytes_sent as f64 * 100.0
|
||||
} else {
|
||||
|
||||
@@ -175,8 +175,7 @@ impl NativeClient {
|
||||
let (mic_tx, mic_rx) = tokio::sync::mpsc::unbounded_channel::<(u32, u64, Vec<u8>)>();
|
||||
let (rich_input_tx, rich_input_rx) = tokio::sync::mpsc::unbounded_channel::<RichInput>();
|
||||
let (ctrl_tx, ctrl_rx) = tokio::sync::mpsc::unbounded_channel::<CtrlRequest>();
|
||||
let (ready_tx, ready_rx) =
|
||||
std::sync::mpsc::channel::<Result<Negotiated>>();
|
||||
let (ready_tx, ready_rx) = std::sync::mpsc::channel::<Result<Negotiated>>();
|
||||
let shutdown = Arc::new(AtomicBool::new(false));
|
||||
let mode_slot = Arc::new(std::sync::Mutex::new(mode));
|
||||
let probe = Arc::new(Mutex::new(ProbeState::default()));
|
||||
|
||||
@@ -46,7 +46,12 @@ pub fn advertise_native(
|
||||
props.insert("fp".into(), fingerprint.to_string());
|
||||
props.insert(
|
||||
"pair".into(),
|
||||
if require_pairing { "required" } else { "optional" }.into(),
|
||||
if require_pairing {
|
||||
"required"
|
||||
} else {
|
||||
"optional"
|
||||
}
|
||||
.into(),
|
||||
);
|
||||
props.insert("id".into(), uniqueid.to_string());
|
||||
let service = ServiceInfo::new(NATIVE_SERVICE, hostname, &host_name, ip, port, props)
|
||||
|
||||
@@ -607,7 +607,10 @@ impl DualSenseManager {
|
||||
}
|
||||
match DualSensePad::open(idx as u8) {
|
||||
Ok(p) => {
|
||||
tracing::info!(index = idx, "virtual DualSense created (UHID hid-playstation)");
|
||||
tracing::info!(
|
||||
index = idx,
|
||||
"virtual DualSense created (UHID hid-playstation)"
|
||||
);
|
||||
self.pads[idx] = Some(p);
|
||||
self.state[idx] = DsState::neutral();
|
||||
self.last_rumble[idx] = (0, 0);
|
||||
|
||||
Reference in New Issue
Block a user