Skip to content

Commit b44cb13

Browse files
committed
Remove isahc section
1 parent 6f78c7f commit b44cb13

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

opentelemetry-http/src/lib.rs

-26
Original file line numberDiff line numberDiff line change
@@ -99,32 +99,6 @@ mod reqwest {
9999
}
100100
}
101101

102-
#[cfg(feature = "isahc")]
103-
mod isahc {
104-
use crate::ResponseExt;
105-
106-
use super::{async_trait, Bytes, HttpClient, HttpError, Request, Response};
107-
use isahc::AsyncReadResponseExt;
108-
use std::convert::TryInto as _;
109-
110-
#[async_trait]
111-
impl HttpClient for isahc::HttpClient {
112-
async fn send(&self, request: Request<Vec<u8>>) -> Result<Response<Bytes>, HttpError> {
113-
let mut response = self.send_async(request).await?;
114-
let mut bytes = Vec::with_capacity(response.body().len().unwrap_or(0).try_into()?);
115-
response.copy_to(&mut bytes).await?;
116-
117-
let headers = std::mem::take(response.headers_mut());
118-
let mut http_response = Response::builder()
119-
.status(response.status().as_u16())
120-
.body(bytes.into())?;
121-
*http_response.headers_mut() = headers;
122-
123-
Ok(http_response.error_for_status()?)
124-
}
125-
}
126-
}
127-
128102
#[cfg(feature = "hyper")]
129103
pub mod hyper {
130104
use crate::ResponseExt;

0 commit comments

Comments
 (0)