Make multipart an optional feature (default off) (#1128)

This commit is contained in:
nickelc
2021-01-04 22:20:17 +01:00
committed by GitHub
parent 1f425a0244
commit afed48cafd
12 changed files with 51 additions and 9 deletions

View File

@@ -152,6 +152,7 @@ impl Body {
ImplStream(self)
}
#[cfg(feature = "multipart")]
pub(crate) fn content_length(&self) -> Option<u64> {
match self.inner {
Inner::Reusable(ref bytes) => Some(bytes.len() as u64),