Skip to content

Commit

Permalink
Implement copy and clone for port specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmedrano committed Jan 1, 2018
1 parent bb7d7ce commit 2628107
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/port/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use port::port_flags::{IS_INPUT, IS_OUTPUT, PortFlags};
/// let spec = jack::port::AudioInSpec::default();
/// let audio_in_port = client.register_port("in", spec).unwrap();
/// ```
#[derive(Debug, Default)]
#[derive(Copy, Clone, Debug, Default)]
pub struct AudioInSpec;

/// `AudioOutSpec` implements the `PortSpec` trait, which defines an
Expand All @@ -37,7 +37,7 @@ pub struct AudioInSpec;
/// let spec = jack::port::AudioInSpec::default();
/// let audio_out_port = client.register_port("out", spec).unwrap();
/// ```
#[derive(Debug, Default)]
#[derive(Copy, Clone, Debug, Default)]
pub struct AudioOutSpec;


Expand Down
4 changes: 2 additions & 2 deletions src/port/midi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ impl<'a> Default for RawMidi<'a> {
/// `MidiInSpec` implements the `PortSpec` trait, which defines an endpoint for
/// JACK. In this case,
/// it defines midi input.
#[derive(Debug, Default)]
#[derive(Copy, Clone, Debug, Default)]
pub struct MidiInSpec;

/// `MidiOutSpec` implements the `PortSpec` trait, which defines an endpoint
/// for JACK. In this case,
/// it defines a midi output.
#[derive(Debug, Default)]
#[derive(Copy, Clone, Debug, Default)]
pub struct MidiOutSpec;

unsafe impl PortSpec for MidiInSpec {
Expand Down

0 comments on commit 2628107

Please sign in to comment.