Skip to content

Commit

Permalink
Make extprim an optional feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hcpl committed Sep 3, 2017
1 parent 92861b1 commit d6955bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ travis-ci = { repository = "hcpl/serde_mtproto" }
[dependencies]
byteorder = "1.1.0"
error-chain = "0.10.0"
extprim = "1.4.0"
extprim = { version = "1.4.0", optional = true }
log = "0.3.8"
num-traits = "0.1.40"
serde = "1.0.11"
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
extern crate byteorder;
#[macro_use]
extern crate error_chain;
#[cfg(feature = "extprim")]
extern crate extprim;
#[macro_use]
extern crate log;
Expand Down
3 changes: 3 additions & 0 deletions src/sized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ impl_mt_proto_sized_for_primitives! {

f32 => DOUBLE_SIZE,
f64 => DOUBLE_SIZE,
}

#[cfg(feature = "extprim")]
impl_mt_proto_sized_for_primitives! {
::extprim::i128::i128 => INT128_SIZE,
::extprim::u128::u128 => INT128_SIZE,
}
Expand Down

0 comments on commit d6955bf

Please sign in to comment.