about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/guide-lifetimes.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/guide-lifetimes.md b/src/doc/guide-lifetimes.md
index dd79d63d514..b6ea1ddb394 100644
--- a/src/doc/guide-lifetimes.md
+++ b/src/doc/guide-lifetimes.md
@@ -56,7 +56,7 @@ a reference.
 fn compute_distance(p1: &Point, p2: &Point) -> f64 {
     let x_d = p1.x - p2.x;
     let y_d = p1.y - p2.y;
-    sqrt(x_d * x_d + y_d * y_d)
+    (x_d * x_d + y_d * y_d).sqrt()
 }
 ~~~