Skip to content

Commit 2bbb3aa

Browse files
committed
clean up most warnings
1 parent d61eea1 commit 2bbb3aa

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/main.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn run() -> Result<()> {
126126
info!("control out endpoint: {:?}", ctrl_out_endpoint);
127127

128128
match handle.set_auto_detach_kernel_driver(true) {
129-
ok@Ok(()) => Ok(()),
129+
Ok(()) => Ok(()),
130130
Err(rusb::Error::NotSupported) => Ok(()),
131131
err => err
132132
}.unwrap();
@@ -274,10 +274,10 @@ fn run_reader<T: UsbContext>(
274274
midi_out.ports().into_iter().find(|p| &midi_out.port_name(&p).unwrap() == name)
275275
.map(|p| (midi_out.port_name(&p).unwrap(), midi_out.connect(&p, client_name).unwrap())),
276276
#[cfg(unix)]
277-
MidiPort::Virtual(ref name) =>
277+
MidiPort::Virtual(ref _name) =>
278278
Some((client_name.to_string(), midi_out.create_virtual(client_name).unwrap())),
279279
#[cfg(not(unix))]
280-
MidiPort::Virtual(ref name) => {
280+
MidiPort::Virtual(ref _name) => {
281281
unimplemented!("virtual midi ports are currently unsupported on non-unix systems")
282282
}
283283
}
@@ -436,7 +436,7 @@ fn run_midi_receiver(
436436
tx
437437
).unwrap())),
438438
#[cfg(unix)]
439-
MidiPort::Virtual(ref name) =>
439+
MidiPort::Virtual(ref _name) =>
440440
Some((client_name.to_string(), midi_in.create_virtual(
441441
client_name,
442442
move |_time, msg, tx| {
@@ -445,7 +445,7 @@ fn run_midi_receiver(
445445
tx
446446
).unwrap())),
447447
#[cfg(not(unix))]
448-
MidiPort::Virtual(ref name) => {
448+
MidiPort::Virtual(ref _name) => {
449449
unimplemented!("virtual midi ports are currently unsupported on non-unix systems")
450450
}
451451
};
@@ -467,6 +467,4 @@ fn run_midi_receiver(
467467

468468
ctrl_tx.send(data)?
469469
}
470-
471-
Ok(())
472470
}

0 commit comments

Comments
 (0)