м
Size: a a a
м
м
λ
D
D
tokio::run({
listener
.incoming()
.map_err(|e| println!("failed to accept socket; err = {:?}", e))
.for_each(move |socket| {
let h = http.clone();
tokio::spawn({
new_service.new_http_service()
.map_err(|_| unimplemented!())
.and_then(move |service| {
let service = Lift::new(service);
h.serve_connection(socket, service)
.map(|_| ())
.map_err(|e| {
println!("failed to serve connection; err={:?}", e);
})
})
})
})
});ph
D
incoming().for_each(...)ph
D
D
м
D
м
ph
ph
D
ph
ph
A
error[E0308]: if and else have incompatible types
--> src/cacher.rs:144:17
|
144 | / if *addr == self.server_addr {
145 | | debug!("Received {:?} from server.. So updating the cache.", header);
146 | |
147 | | self.cached_responses.insert(header.clone(), data.clone());
... |
154 | | self.ban_client(*addr)
155 | | }
| |_________________^ expected anonymized type, found a different anonymized type
|
= note: expected type `impl cacher::futures::Future` (anonymized type)
found type `impl cacher::futures::Future` (anonymized type)
D