Skip to content

Commit

Permalink
chore(examples): Remove clone on copy value (#1794)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Jul 13, 2024
1 parent e5505a4 commit b2e5665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/routeguide-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/routeguide/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b2e5665

Please sign in to comment.