From b2e566547ebc360d13bed239cb8924a7c6959a6c Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 13 Jul 2024 14:51:31 +0900 Subject: [PATCH] chore(examples): Remove clone on copy value (#1794) --- examples/routeguide-tutorial.md | 2 +- examples/src/routeguide/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);