From 54babf8aa3d2f9943c875cab52316b87dccc8f36 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Tue, 28 Oct 2014 16:09:14 +0100 Subject: [PATCH] Guide: Fix use of sqrt() in example --- src/doc/guide-lifetimes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/guide-lifetimes.md b/src/doc/guide-lifetimes.md index dd79d63d51453..b6ea1ddb3949d 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() } ~~~