diff --git a/guide/src/qs_4.md b/guide/src/qs_4.md index e7193ae55..a8424a4a0 100644 --- a/guide/src/qs_4.md +++ b/guide/src/qs_4.md @@ -89,8 +89,7 @@ impl Handler for MyHandler { /// Handle request fn handle(&mut self, req: HttpRequest) -> Self::Result { - let num = self.0.load(Ordering::Relaxed) + 1; - self.0.store(num, Ordering::Relaxed); + self.0.fetch_add(1, Ordering::Relaxed); httpcodes::HTTPOk.into() } }