Put the tokio codec (IrcCodec) behind a tokio
feature.
This commit is contained in:
parent
62fc67ce19
commit
3003d9bdcc
2 changed files with 11 additions and 2 deletions
|
@ -12,8 +12,12 @@ repository = "https://github.com/aatxe/irc"
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "aatxe/irc" }
|
travis-ci = { repository = "aatxe/irc" }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["tokio"]
|
||||||
|
tokio = ["tokio-io", "bytes"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = { version = "0.4", optional = true }
|
||||||
encoding = "0.2"
|
encoding = "0.2"
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
tokio-io = "0.1"
|
tokio-io = { version = "0.1", optional = true }
|
||||||
|
|
|
@ -2,17 +2,21 @@
|
||||||
|
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
extern crate bytes;
|
extern crate bytes;
|
||||||
extern crate encoding;
|
extern crate encoding;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate failure;
|
extern crate failure;
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
extern crate tokio_io;
|
extern crate tokio_io;
|
||||||
|
|
||||||
pub mod caps;
|
pub mod caps;
|
||||||
pub mod chan;
|
pub mod chan;
|
||||||
pub mod command;
|
pub mod command;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
pub mod irc;
|
pub mod irc;
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
pub mod line;
|
pub mod line;
|
||||||
pub mod message;
|
pub mod message;
|
||||||
pub mod mode;
|
pub mod mode;
|
||||||
|
@ -21,6 +25,7 @@ pub mod response;
|
||||||
pub use self::caps::{Capability, NegotiationVersion};
|
pub use self::caps::{Capability, NegotiationVersion};
|
||||||
pub use self::chan::ChannelExt;
|
pub use self::chan::ChannelExt;
|
||||||
pub use self::command::{BatchSubCommand, CapSubCommand, Command};
|
pub use self::command::{BatchSubCommand, CapSubCommand, Command};
|
||||||
|
#[cfg(feature = "tokio")]
|
||||||
pub use self::irc::IrcCodec;
|
pub use self::irc::IrcCodec;
|
||||||
pub use self::message::Message;
|
pub use self::message::Message;
|
||||||
pub use self::mode::{ChannelMode, Mode, UserMode};
|
pub use self::mode::{ChannelMode, Mode, UserMode};
|
||||||
|
|
Loading…
Add table
Reference in a new issue