aboutsummaryrefslogtreecommitdiff
path: root/src/encoder
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2016-07-28 11:08:39 -0700
committerDavid Tolnay <dtolnay@gmail.com>2016-07-28 11:09:50 -0700
commit86b9259616ed05fe32c5eee233b65e7934a76666 (patch)
tree66455141f96d028ef25193b36f9a1dc3864dc1ab /src/encoder
parentd858c1f2d06f977b4d3c26ea82c72eb04bcf5fad (diff)
downloadmilf-rs-86b9259616ed05fe32c5eee233b65e7934a76666.tar.gz
milf-rs-86b9259616ed05fe32c5eee233b65e7934a76666.zip
Cfg off functions only needed for rustc-serialize or serde
Diffstat (limited to 'src/encoder')
-rw-r--r--src/encoder/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/encoder/mod.rs b/src/encoder/mod.rs
index 0f13b81..fb00a47 100644
--- a/src/encoder/mod.rs
+++ b/src/encoder/mod.rs
@@ -113,6 +113,7 @@ impl Encoder {
}
}
+ #[cfg(feature = "rustc-serialize")]
fn seq<F>(&mut self, f: F) -> Result<(), Error>
where F: FnOnce(&mut Encoder) -> Result<(), Error>
{
@@ -132,6 +133,7 @@ impl Encoder {
}
}
+ #[cfg(feature = "rustc-serialize")]
fn table<F>(&mut self, f: F) -> Result<(), Error>
where F: FnOnce(&mut Encoder) -> Result<(), Error>
{
@@ -154,6 +156,7 @@ impl Encoder {
}
}
+ #[cfg(feature = "serde")]
fn table_begin(&mut self) -> Result<Self, Error> {
match self.state {
State::NextMapKey => Err(Error::InvalidMapKeyLocation),
@@ -161,6 +164,7 @@ impl Encoder {
}
}
+ #[cfg(feature = "serde")]
fn table_end(&mut self, mut state: Self) -> Result<(), Error> {
match state.state {
State::NextKey(key) => {