Added crate feature (for real this time)
This commit is contained in:
parent
8fc908a38e
commit
9dbac49bc4
|
@ -23,4 +23,5 @@ optional = true
|
|||
[features]
|
||||
default = ["tls"]
|
||||
tls = ["native-tls"]
|
||||
debug = []
|
||||
|
||||
|
|
|
@ -181,6 +181,10 @@ impl Command {
|
|||
/// Performs the conversion
|
||||
pub fn from_str(s: &str) -> Self {
|
||||
let new = s.trim();
|
||||
|
||||
#[cfg(feature = "debug")]
|
||||
print!("{}", new);
|
||||
|
||||
let parts: Vec<&str> = new.split_whitespace().collect();
|
||||
|
||||
if parts[0] == "PING" {
|
||||
|
|
|
@ -188,6 +188,9 @@ impl Client {
|
|||
Cow::Owned(new) as Cow<str>
|
||||
};
|
||||
|
||||
#[cfg(feature = "debug")]
|
||||
println!("{:?}", formatted);
|
||||
|
||||
self.stream.write(formatted.as_bytes())?;
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue