diff --git a/examples/routeguide-tutorial.md b/examples/routeguide-tutorial.md index 564ccc66a..06207b461 100644 --- a/examples/routeguide-tutorial.md +++ b/examples/routeguide-tutorial.md @@ -498,7 +498,7 @@ async fn route_chat( while let Some(note) = stream.next().await { let note = note?; - let location = note.location.clone().unwrap(); + let location = note.location.unwrap(); let location_notes = notes.entry(location).or_insert(vec![]); location_notes.push(note); diff --git a/examples/src/routeguide/server.rs b/examples/src/routeguide/server.rs index c3ec4b32b..93d456746 100644 --- a/examples/src/routeguide/server.rs +++ b/examples/src/routeguide/server.rs @@ -116,7 +116,7 @@ impl RouteGuide for RouteGuideService { while let Some(note) = stream.next().await { let note = note?; - let location = note.location.clone().unwrap(); + let location = note.location.unwrap(); let location_notes = notes.entry(location).or_insert(vec![]); location_notes.push(note);