Skip to content

Commit

Permalink
chore: Fix routeguide example warning (#807)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Oct 22, 2021
1 parent 3ab00f3 commit bbcacd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/src/routeguide/client.rs
Expand Up @@ -65,7 +65,8 @@ async fn run_route_chat(client: &mut RouteGuideClient<Channel>) -> Result<(), Bo
let outbound = async_stream::stream! {
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 note = RouteNote {
location: Some(Point {
Expand Down
4 changes: 3 additions & 1 deletion examples/src/uds/server.rs
Expand Up @@ -50,7 +50,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let uds = UnixListener::bind(path)?;

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;
}
}
Expand Down

0 comments on commit bbcacd0

Please sign in to comment.