removed dbg statements #6
This commit is contained in:
parent
c00d9ecf01
commit
93f4009a93
7 changed files with 0 additions and 12 deletions
|
@ -91,7 +91,6 @@ impl SonicStream {
|
||||||
fn write<SC: StreamCommand>(&self, command: &SC) -> Result<()> {
|
fn write<SC: StreamCommand>(&self, command: &SC) -> Result<()> {
|
||||||
let mut writer = BufWriter::with_capacity(self.max_buffer_size, &self.stream);
|
let mut writer = BufWriter::with_capacity(self.max_buffer_size, &self.stream);
|
||||||
let message = command.message();
|
let message = command.message();
|
||||||
dbg!(&message);
|
|
||||||
writer
|
writer
|
||||||
.write_all(message.as_bytes())
|
.write_all(message.as_bytes())
|
||||||
.map_err(|_| Error::new(ErrorKind::WriteToStream))?;
|
.map_err(|_| Error::new(ErrorKind::WriteToStream))?;
|
||||||
|
@ -131,7 +130,6 @@ impl SonicStream {
|
||||||
};
|
};
|
||||||
|
|
||||||
let message = channel.read(1)?;
|
let message = channel.read(1)?;
|
||||||
dbg!(&message);
|
|
||||||
// TODO: need to add support for versions
|
// TODO: need to add support for versions
|
||||||
if message.starts_with("CONNECTED") {
|
if message.starts_with("CONNECTED") {
|
||||||
Ok(channel)
|
Ok(channel)
|
||||||
|
|
|
@ -12,7 +12,6 @@ impl StreamCommand for PingCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn receive(&self, message: String) -> Result<Self::Response> {
|
fn receive(&self, message: String) -> Result<Self::Response> {
|
||||||
dbg!(&message);
|
|
||||||
if message == "PONG\r\n" {
|
if message == "PONG\r\n" {
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -26,8 +26,6 @@ impl StreamCommand for PushCommand<'_> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn receive(&self, message: String) -> Result<Self::Response> {
|
fn receive(&self, message: String) -> Result<Self::Response> {
|
||||||
dbg!(&message);
|
|
||||||
|
|
||||||
if message == "OK\r\n" {
|
if message == "OK\r\n" {
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -41,8 +41,6 @@ impl StreamCommand for QueryCommand<'_> {
|
||||||
static ref RE: Regex = Regex::new(RE_QUERY_RECEIVED_MESSAGE).unwrap();
|
static ref RE: Regex = Regex::new(RE_QUERY_RECEIVED_MESSAGE).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg!(&message);
|
|
||||||
|
|
||||||
if let Some(caps) = RE.captures(&message) {
|
if let Some(caps) = RE.captures(&message) {
|
||||||
if caps["pending_query_id"] != caps["event_query_id"] {
|
if caps["pending_query_id"] != caps["event_query_id"] {
|
||||||
Err(Error::new(ErrorKind::QueryResponseError(
|
Err(Error::new(ErrorKind::QueryResponseError(
|
||||||
|
|
|
@ -12,7 +12,6 @@ impl StreamCommand for QuitCommand {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn receive(&self, message: String) -> Result<Self::Response> {
|
fn receive(&self, message: String) -> Result<Self::Response> {
|
||||||
dbg!(&message);
|
|
||||||
if message.starts_with("ENDED ") {
|
if message.starts_with("ENDED ") {
|
||||||
Ok(true)
|
Ok(true)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -38,8 +38,6 @@ impl StreamCommand for StartCommand {
|
||||||
static ref RE: Regex = Regex::new(RE_START_RECEIVED_MESSAGE).unwrap();
|
static ref RE: Regex = Regex::new(RE_START_RECEIVED_MESSAGE).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg!(&message);
|
|
||||||
|
|
||||||
if let Some(caps) = RE.captures(&message) {
|
if let Some(caps) = RE.captures(&message) {
|
||||||
if self.mode.to_str() != &caps["mode"] {
|
if self.mode.to_str() != &caps["mode"] {
|
||||||
Err(Error::new(ErrorKind::SwitchMode))
|
Err(Error::new(ErrorKind::SwitchMode))
|
||||||
|
|
|
@ -37,8 +37,6 @@ impl StreamCommand for SuggestCommand<'_> {
|
||||||
static ref RE: Regex = Regex::new(RE_SUGGEST_RECEIVED_MESSAGE).unwrap();
|
static ref RE: Regex = Regex::new(RE_SUGGEST_RECEIVED_MESSAGE).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg!(&message);
|
|
||||||
|
|
||||||
match RE.captures(&message) {
|
match RE.captures(&message) {
|
||||||
None => Err(Error::new(ErrorKind::WrongSonicResponse)),
|
None => Err(Error::new(ErrorKind::WrongSonicResponse)),
|
||||||
Some(caps) => {
|
Some(caps) => {
|
||||||
|
|
Loading…
Reference in a new issue