From 43712ac366cf424900603b816714ebed8e4a3921 Mon Sep 17 00:00:00 2001 From: Nelson Chen Date: Fri, 7 Jul 2017 15:52:22 -0700 Subject: [PATCH] Add Debug derivation to structs of the example in README.md (#191) The `assert_eq!` macro expects its arguments to satisfy the `Debug` trait as if and when it panics, it'll print out the `Debug` representation. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbb0da7..adfd126 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,13 @@ extern crate bincode; use bincode::{serialize, deserialize, Infinite}; -#[derive(Serialize, Deserialize, PartialEq)] +#[derive(Serialize, Deserialize, PartialEq, Debug)] struct Entity { x: f32, y: f32, } -#[derive(Serialize, Deserialize, PartialEq)] +#[derive(Serialize, Deserialize, PartialEq, Debug)] struct World(Vec); fn main() {