Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Introduce zero-valued EventType to enable zero-initialization of Event (
Browse files Browse the repository at this point in the history
#138)

This avoids panicking on Rust 1.48 and later.

Fixes #131
  • Loading branch information
askeksa authored Nov 7, 2020
1 parent bec471c commit aa6e508
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ impl Events {
#[repr(i32)]
#[derive(Copy, Clone, Debug)]
pub enum EventType {
/// Value used for uninitialized placeholder events.
_Placeholder = 0,

/// Midi event. See `api::MidiEvent`.
Midi = 1,

Expand Down

0 comments on commit aa6e508

Please sign in to comment.