From 4a393d86889d7243fc97a0ecafd3584ac730692a Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 13 Jul 2024 13:32:18 +0900 Subject: [PATCH] chore(examples): Remove clone on copy value --- 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);