mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-30 05:11:13 +00:00
Fix async tests
This commit is contained in:
parent
b731dbe90f
commit
23d13adb12
@ -31,13 +31,15 @@ impl<'a> DeContext<'a> {
|
||||
|
||||
pub async fn next_packet(&mut self) -> Result<(), failure::Error> {
|
||||
if let Some(stream) = &mut self.stream {
|
||||
println!("Called next packet");
|
||||
self.decoder = Decoder::new(stream.next_packet().await?);
|
||||
|
||||
Ok(())
|
||||
} else {
|
||||
failure::bail!("Calling next_packet on DeContext with no stream provided")
|
||||
return Ok(());
|
||||
} else if self.decoder.buf.len() > 0 {
|
||||
// There is still data in the buffer
|
||||
return Ok(())
|
||||
}
|
||||
|
||||
failure::bail!("Calling next_packet on DeContext with no stream provided")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use crate::mariadb::{DeContext, Deserialize, ComStmtPrepareOk, ColumnDefPacket, Capabilities, EofPacket};
|
||||
use crate::mariadb::{Framed, DeContext, Deserialize, ComStmtPrepareOk, ColumnDefPacket, Capabilities, EofPacket};
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct ComStmtPrepareResp {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user