diff options
| author | Graham Northup <grissess@nexusg.org> | 2017-10-13 12:54:04 -0400 | 
|---|---|---|
| committer | Graham Northup <grissess@nexusg.org> | 2017-10-13 12:54:04 -0400 | 
| commit | 22cb7d7cbcacbfe3a7d3a2d454e6b8cf49ae989c (patch) | |
| tree | 4d2d8cb2ce9c4441ce5cc525375665c44c31f9fb /src/proto.rs | |
| parent | 255f0aa6de604e0bf9d37ba0ee5362ef3b9f235f (diff) | |
Added LUTs and ControlRate; improved parser
Diffstat (limited to 'src/proto.rs')
| -rw-r--r-- | src/proto.rs | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/src/proto.rs b/src/proto.rs index 630e3e8..279cd3f 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -71,15 +71,15 @@ impl Command {  impl fmt::Debug for Command {      fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { -        write!(f, "Command::")?; +        f.write_str("Command::")?;          match *self { -            Command::KeepAlive => write!(f, "KeepAlive"), -            Command::Ping{data} => write!(f, "Ping {{ data: {:?} }}", &data), -            Command::Quit => write!(f, "Quit"), -            Command::Play{sec, usec, freq, amp, voice} => write!(f, "Play {{ sec: {:?}, usec: {:?}, freq: {:?}, amp: {:?}, voice: {:?} }}", sec, usec, freq, amp, voice), -            Command::Caps{voices, tp, ident} => write!(f, "Caps {{ voices: {:?}, tp: {:?}, ident: {:?} }}", voices, &tp, &ident), -            Command::PCM{samples} => write!(f, "PCM {{ samples: {:?} }}", &samples), -            Command::Unknown{data} => write!(f, "Unknown {{ data: {:?} }}", &data as &[u8]), +            Command::KeepAlive => f.write_str("KeepAlive"), +            Command::Ping{data} => f.debug_struct("Ping").field("data", &data).finish(), +            Command::Quit => f.write_str("Quit"), +            Command::Play{sec, usec, freq, amp, voice} => f.debug_struct("Play").field("sec", &sec).field("usec", &usec).field("freq", &freq).field("amp", &).field("voice", &voice).finish(), +            Command::Caps{voices, tp, ident} => f.debug_struct("Caps").field("voices", &voices).field("tp", &tp).field("ident", &ident).finish(), +            Command::PCM{samples} => f.debug_struct("PCM").field("samples", &samples).finish(), +            Command::Unknown{data} => f.debug_struct("Unknown").field("data", &(&data as &[u8])).finish(),          }      }  } | 
