From 9fdb7dd631d8a59f0183d8a180f78f64740b74da Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 6 Feb 2016 00:57:30 +0100 Subject: [PATCH] Fixup indentation --- src/array_string.rs | 14 +++++++------- tests/tests.rs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/array_string.rs b/src/array_string.rs index 4e78652..06960e9 100644 --- a/src/array_string.rs +++ b/src/array_string.rs @@ -45,7 +45,7 @@ impl> ArrayString { } } - /// Create a new `ArrayString` from a string slice. + /// Create a new `ArrayString` from a `str`. /// /// Capacity is inferred from the type parameter. /// @@ -54,14 +54,14 @@ impl> ArrayString { /// /// let mut string = ArrayString::<[_; 3]>::from("foo").unwrap(); /// assert_eq!(&string[..], "foo"); - /// assert_eq!(string.len(), 3); + /// assert_eq!(string.len(), 3); /// assert_eq!(string.capacity(), 3); /// ``` - pub fn from(s: &str) -> Result> { - let mut arraystr = Self::new(); - try!(arraystr.push_str(s)); - Ok(arraystr) - } + pub fn from(s: &str) -> Result> { + let mut arraystr = Self::new(); + try!(arraystr.push_str(s)); + Ok(arraystr) + } /// Return the capacity of the `ArrayString`. /// diff --git a/tests/tests.rs b/tests/tests.rs index 8aa1baa..b710bd5 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -298,6 +298,6 @@ fn test_string() { // Test `from` constructor let u = ArrayString::<[_; 11]>::from(text).unwrap(); - assert_eq!(&u, text); + assert_eq!(&u, text); assert_eq!(u.len(), text.len()); }