Replace pub field with AsRef impl

This commit is contained in:
Tyera Eulberg
2018-07-31 15:50:09 -06:00
committed by Grimes
parent fda3b9bbd4
commit 7ff721e563
6 changed files with 25 additions and 10 deletions

View File

@@ -136,7 +136,7 @@ pub struct NodeInfo {
}
fn make_debug_id(key: &PublicKey) -> u64 {
let buf: &[u8] = &key.0;
let buf: &[u8] = &key.as_ref();
let mut rdr = Cursor::new(&buf[..8]);
rdr.read_u64::<LittleEndian>()
.expect("rdr.read_u64 in fn debug_id")