Fixup indentation

This commit is contained in:
bluss
2016-02-06 00:57:30 +01:00
parent 95fb85c241
commit 9fdb7dd631
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -45,7 +45,7 @@ impl<A: Array<Item=u8>> ArrayString<A> {
}
}
/// 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<A: Array<Item=u8>> ArrayString<A> {
///
/// 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<Self, CapacityError<&str>> {
let mut arraystr = Self::new();
try!(arraystr.push_str(s));
Ok(arraystr)
}
pub fn from(s: &str) -> Result<Self, CapacityError<&str>> {
let mut arraystr = Self::new();
try!(arraystr.push_str(s));
Ok(arraystr)
}
/// Return the capacity of the `ArrayString`.
///
+1 -1
View File
@@ -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());
}