Skip to content

Commit

Permalink
ndk: Make examples in ndk::midi compilable
Browse files Browse the repository at this point in the history
  • Loading branch information
paxbun committed Aug 17, 2023
1 parent 83fe4b2 commit 2e458e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ndk/src/midi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ pub enum MidiOpcode {
/// The length of the received message. The caller should limit the passed `buffer` slice to
/// this length after [`MidiOutputPort::receive()`] returns.
/// ```no_run
/// let output_port: MidiOutputPort = ...;
/// use ndk::midi::MidiOutputPort;
///
/// let output_port: MidiOutputPort = todo!();
/// let mut buffer = [0u8; 128];
/// if let Ok(MidiOpcode::Data { length, .. }) = output_port.receive(&mut buffer) {
/// let buffer = &buffer[..length];
Expand Down

0 comments on commit 2e458e2

Please sign in to comment.