chore: Fix routeguide example warning (#807)
This commit is contained in:
@@ -65,7 +65,8 @@ async fn run_route_chat(client: &mut RouteGuideClient<Channel>) -> Result<(), Bo
|
|||||||
let outbound = async_stream::stream! {
|
let outbound = async_stream::stream! {
|
||||||
let mut interval = time::interval(Duration::from_secs(1));
|
let mut interval = time::interval(Duration::from_secs(1));
|
||||||
|
|
||||||
while let time = interval.tick().await {
|
loop {
|
||||||
|
let time = interval.tick().await;
|
||||||
let elapsed = time.duration_since(start);
|
let elapsed = time.duration_since(start);
|
||||||
let note = RouteNote {
|
let note = RouteNote {
|
||||||
location: Some(Point {
|
location: Some(Point {
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let uds = UnixListener::bind(path)?;
|
let uds = UnixListener::bind(path)?;
|
||||||
|
|
||||||
async_stream::stream! {
|
async_stream::stream! {
|
||||||
while let item = uds.accept().map_ok(|(st, _)| unix::UnixStream(st)).await {
|
loop {
|
||||||
|
let item = uds.accept().map_ok(|(st, _)| unix::UnixStream(st)).await;
|
||||||
|
|
||||||
yield item;
|
yield item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user