Skip to content

Commit a151a46

Browse files
authored
Fix ambiguous imports (#669)
1 parent ffb20e8 commit a151a46

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/http/client.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ use alloc::string::ToString;
1616

1717
use ::log::*;
1818

19-
#[allow(unused_imports)]
20-
use embedded_svc::http::client::*;
2119
use embedded_svc::io::{ErrorType, Read, Write};
2220

2321
use crate::sys::*;
@@ -551,7 +549,7 @@ impl RawHandle for EspHttpConnection {
551549
}
552550
}
553551

554-
impl Status for EspHttpConnection {
552+
impl embedded_svc::http::Status for EspHttpConnection {
555553
fn status(&self) -> u16 {
556554
EspHttpConnection::status(self)
557555
}
@@ -593,7 +591,7 @@ impl Write for EspHttpConnection {
593591
}
594592
}
595593

596-
impl Connection for EspHttpConnection {
594+
impl embedded_svc::http::client::Connection for EspHttpConnection {
597595
type Headers = Self;
598596

599597
type Read = Self;

src/http/server.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ use alloc::vec::Vec;
5555
use ::log::{info, warn};
5656

5757
use embedded_svc::http::headers::content_type;
58-
#[allow(unused_imports)]
59-
use embedded_svc::http::*;
6058
use embedded_svc::io::{ErrorType, Read, Write};
6159

6260
use esp_idf_hal::cpu::Core;
@@ -661,7 +659,7 @@ impl<'a> EspHttpServer<'a> {
661659

662660
fn to_native_handler<H>(&self, handler: H) -> NativeHandler<'a>
663661
where
664-
H: for<'r> Handler<EspHttpConnection<'a>> + Send + 'a,
662+
H: Handler<EspHttpConnection<'a>> + Send + 'a,
665663
{
666664
Box::new(move |raw_req| {
667665
let mut connection = EspHttpConnection::new(unsafe { raw_req.as_mut().unwrap() });
@@ -1231,7 +1229,7 @@ impl RawHandle for EspHttpConnection<'_> {
12311229
}
12321230
}
12331231

1234-
impl Query for EspHttpConnection<'_> {
1232+
impl embedded_svc::http::Query for EspHttpConnection<'_> {
12351233
fn uri(&self) -> &str {
12361234
EspHttpConnection::uri(self)
12371235
}

0 commit comments

Comments
 (0)