update to modern rust:
 - qualify enum values; derive Copy
 - use {} Show format rather than {:?} debug format
 - drop unused `socket` variable in main()
 - TcpStream::connect() takes just one trait arg now
 - fail!() becomes panic!()
 - assert_eq, bitflags macros need trailing ;
 - static becomes const in bitflags
 - array to slice no longer implicit (in read_id_string)