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

Commit aa6e508

Browse files
authored
Introduce zero-valued EventType to enable zero-initialization of Event (#138)
This avoids panicking on Rust 1.48 and later. Fixes #131
1 parent bec471c commit aa6e508

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api.rs

+3
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@ impl Events {
464464
#[repr(i32)]
465465
#[derive(Copy, Clone, Debug)]
466466
pub enum EventType {
467+
/// Value used for uninitialized placeholder events.
468+
_Placeholder = 0,
469+
467470
/// Midi event. See `api::MidiEvent`.
468471
Midi = 1,
469472

0 commit comments

Comments
 (0)