Skip to content

Commit

Permalink
Remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
donniebishop authored Mar 25, 2017
1 parent 33a6a07 commit 64cd0be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ pub mod pattern;
/// ```
/// use std::str::FromStr;
/// use std::num::ParseIntError;
///
///
/// #[derive(Debug, PartialEq)]
/// struct Point {
/// x: i32,
/// y: i32
/// }
///
///
/// impl FromStr for Point {
/// type Err = ParseIntError;
///
///
/// fn from_str(s: &str) -> Result<Self, Self::Err> {
/// let coords: Vec<&str> = s.trim_matches(|p| p == '(' || p == ')' )
/// .split(",")
/// .collect();
///
///
/// let x_fromstr = try!(coords[0].parse::<i32>());
/// let y_fromstr = try!(coords[1].parse::<i32>());
///
///
/// Ok(Point { x: x_fromstr, y: y_fromstr })
/// }
/// }
///
///
/// let p = Point::from_str("(1,2)");
/// assert_eq!(p.unwrap(), Point{ x: 1, y: 2} )
/// ```
Expand Down

0 comments on commit 64cd0be

Please sign in to comment.