Skip to content

Commit

Permalink
Fix compilation without tls
Browse files Browse the repository at this point in the history
  • Loading branch information
rmja committed May 17, 2024
1 parent 3a6499a commit f3bd3cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,14 @@ where
.await
.map_err(|e| e.kind())?;
}
#[cfg(any(feature = "embedded-tls", feature = "esp-mbedtls"))]
HttpConnection::Tls(c) => {
let mut writer = ChunkedBodyWriter::new(c);
body.write(&mut writer).await?;
writer.write_empty_chunk().await.map_err(|e| e.kind())?;
}
#[cfg(all(not(feature = "embedded-tls"), not(feature = "esp-mbedtls")))]
HttpConnection::Tls(_) => unreachable!(),
};
}
}
Expand Down Expand Up @@ -664,7 +667,7 @@ mod tests {
}

impl Read for VecBuffer {
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
async fn read(&mut self, _buf: &mut [u8]) -> Result<usize, Self::Error> {
unreachable!()
}
}
Expand Down

0 comments on commit f3bd3cb

Please sign in to comment.