Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make publicly exported types implement Debug trait #2

Merged
merged 1 commit into from
Feb 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(missing_debug_implementations)]

extern crate byteorder;
extern crate num_traits;

Expand All @@ -13,4 +15,4 @@ pub mod proto;
pub mod agent;
pub mod error;

pub use self::agent::Agent;
pub use self::agent::Agent;
3 changes: 2 additions & 1 deletion src/proto/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use serde::de::{

use super::error::{ProtoError, ProtoResult};

#[derive(Debug)]
pub struct Deserializer<R: io::Read> {
reader: R,
}
Expand Down Expand Up @@ -251,4 +252,4 @@ impl<'de, 'a, R: io::Read> VariantAccess<'de> for BinaryEnum<'a, R> {
) -> ProtoResult<V::Value> {
de::Deserializer::deserialize_map(self.de, visitor)
}
}
}
1 change: 1 addition & 0 deletions src/proto/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use serde::ser::{self, Serialize};
use std::io;
use super::error::{ProtoError, ProtoResult};

#[derive(Debug)]
pub struct Serializer<W: io::Write> {
// This string starts empty and JSON is appended as values are serialized.
writer: W
Expand Down