diff options
author | thajohns <thajohns@clarkson.edu> | 2021-09-09 01:16:04 -0400 |
---|---|---|
committer | Graham Northup <grahamnorthup@yahoo.com> | 2021-09-10 04:05:55 -0400 |
commit | 911a4a80eb7e4d98a96b813ebff3e659d50f040c (patch) | |
tree | 7f3c0964b49f2f0d03d18da16f367c5fe8ff1a1d /src/client.rs | |
parent | d6e399973e9bc6447a28b80cacffcbc6a768f1ed (diff) |
formatted some more
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/client.rs b/src/client.rs index bf661d0..89bda03 100644 --- a/src/client.rs +++ b/src/client.rs @@ -139,19 +139,32 @@ impl Client { let mut reply_buffer: [u8; Command::SIZE] = [0u8; Command::SIZE]; reply.write_into(&mut reply_buffer); self.socket.send_to(&reply_buffer, sender); - }, - Command::PCM{..} => { /* TODO */ }, - Command::PCMSyn{..} => { /* TODO */}, - Command::ArtParam{voice, index, value} => { - dprintln!("Articulation parameter voice {:?} index {} value {}", voice, index, value); + } + Command::PCM { .. } => { /* TODO */ } + Command::PCMSyn { .. } => { /* TODO */ } + Command::ArtParam { + voice, + index, + value, + } => { + dprintln!( + "Articulation parameter voice {:?} index {} value {}", + voice, + index, + value + ); for vidx in match voice { - Some(vidx) => ((vidx as usize)..((vidx+1) as usize)), + Some(vidx) => ((vidx as usize)..((vidx + 1) as usize)), None => (0..self.voices.len()), } { - *self.voices[vidx].params.vars.entry(format!("artp{}", index)).or_insert_with(Default::default) = value; + *self.voices[vidx] + .params + .vars + .entry(format!("artp{}", index)) + .or_insert_with(Default::default) = value; } - }, - Command::Unknown{data} => { + } + Command::Unknown { data } => { dprintln!("Dropping packet: unknown data {:?}", (&data as &[u8])); } } |