Skip to content

Commit

Permalink
Merge branch 'algesten:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmal authored Jan 19, 2024
2 parents fefed21 + 26ed596 commit 2853736
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/chunked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![allow(dead_code, unused_imports)]
mod decoder;
pub use decoder::Decoder;

Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl Display for Error {
match self {
Error::Status(status, response) => {
write!(f, "{}: status code {}", response.get_url(), status)?;
if let Some(original) = response.history.get(0) {
if let Some(original) = response.history.first() {
write!(f, " (redirected from {})", original)?;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Header {
///
/// ureq can't know what encoding the header is in, but this function provides
/// an escape hatch for users that need to handle such headers.
#[cfg(any(feature = "http-interop", feature = "charset"))]
#[allow(unused)]
pub fn value_raw(&self) -> &[u8] {
let mut bytes = &self.line.as_bytes()[self.index + 1..];

Expand Down Expand Up @@ -159,7 +159,7 @@ pub fn get_header<'h>(headers: &'h [Header], name: &str) -> Option<&'h str> {
.and_then(|h| h.value())
}

#[cfg(any(doc, all(test, any(feature = "http-interop", feature = "http-crate"))))]
#[allow(unused)]
pub fn get_header_raw<'h>(headers: &'h [Header], name: &str) -> Option<&'h [u8]> {
headers
.iter()
Expand Down
6 changes: 3 additions & 3 deletions src/http_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use crate::{header::HeaderLine, response::ResponseStatusIndex, Request, Response
/// Converts an [`http::Response`] into a [`Response`].
///
/// As an [`http::Response`] does not contain a URL, `"https://example.com/"` is used as a
/// placeholder. Additionally, if the response has a header which cannot be converted into a valid
/// [`Header`](crate::Header), it will be skipped rather than having the conversion fail. The remote
/// address property will also always be `127.0.0.1:80` for similar reasons to the URL.
/// placeholder. Additionally, if the response has a header which cannot be converted to ureq's
/// internal header representation, it will be skipped rather than having the conversion fail.
/// The remote address property will also always be `127.0.0.1:80` for similar reasons to the URL.
///
/// ```
/// # fn main() -> Result<(), http::Error> {
Expand Down

0 comments on commit 2853736

Please sign in to comment.