From 12c6a7e8bbb6b6c29bac556e2bbe370740d57001 Mon Sep 17 00:00:00 2001 From: Yoshito Komatsu Date: Fri, 19 Aug 2016 06:37:30 +0000 Subject: [PATCH] Fix wrong indentation --- nostarch/chapter05.md | 10 +++++----- src/ch05-01-method-syntax.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/nostarch/chapter05.md b/nostarch/chapter05.md index 23ca0a0..7c88439 100644 --- a/nostarch/chapter05.md +++ b/nostarch/chapter05.md @@ -344,12 +344,12 @@ struct Point { } impl Point { - fn distance(&self, other: &Point) -> f64 { - let x_squared = f64::powi(other.x - self.x, 2); - let y_squared = f64::powi(other.y - self.y, 2); + fn distance(&self, other: &Point) -> f64 { + let x_squared = f64::powi(other.x - self.x, 2); + let y_squared = f64::powi(other.y - self.y, 2); - f64::sqrt(x_squared + y_squared) - } + f64::sqrt(x_squared + y_squared) + } } let p1 = Point { x: 0.0, y: 0.0 }; diff --git a/src/ch05-01-method-syntax.md b/src/ch05-01-method-syntax.md index 925f70f..ccc3c1c 100644 --- a/src/ch05-01-method-syntax.md +++ b/src/ch05-01-method-syntax.md @@ -47,12 +47,12 @@ struct Point { } impl Point { - fn distance(&self, other: &Point) -> f64 { - let x_squared = f64::powi(other.x - self.x, 2); - let y_squared = f64::powi(other.y - self.y, 2); + fn distance(&self, other: &Point) -> f64 { + let x_squared = f64::powi(other.x - self.x, 2); + let y_squared = f64::powi(other.y - self.y, 2); - f64::sqrt(x_squared + y_squared) - } + f64::sqrt(x_squared + y_squared) + } } let p1 = Point { x: 0.0, y: 0.0 };