diff options
| author | Benjamin Jones <benjaminfjones@gmail.com> | 2020-07-10 19:01:38 -0700 |
|---|---|---|
| committer | Benjamin Jones <bfj@amazon.com> | 2020-07-11 11:50:54 -0700 |
| commit | bb5f404e35f0091b4beb691105e7ed2a94ce4a13 (patch) | |
| tree | 7ae67dc586f1bdb4ee95dbe960b2f9c6ccaf7b41 /exercises/traits | |
| parent | 106dbbc341bd7846745b37e2203e206abf83ed20 (diff) | |
chore: Alter whitespace for consistency
* Add newline after "I AM DONE" in exercises for consistency
* Remove trailing whitespace from exercises
Diffstat (limited to 'exercises/traits')
| -rw-r--r-- | exercises/traits/traits1.rs | 9 | ||||
| -rw-r--r-- | exercises/traits/traits2.rs | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/exercises/traits/traits1.rs b/exercises/traits/traits1.rs index 8253ef8..2ef9e11 100644 --- a/exercises/traits/traits1.rs +++ b/exercises/traits/traits1.rs @@ -1,21 +1,21 @@ // traits1.rs // Time to implement some traits! -// +// // Your task is to implement the trait // `AppendBar' for the type `String'. -// +// // The trait AppendBar has only one function, // which appends "Bar" to any object // implementing this trait. // I AM NOT DONE + trait AppendBar { fn append_bar(self) -> Self; } impl AppendBar for String { //Add your code here - } fn main() { @@ -40,5 +40,4 @@ mod tests { String::from("BarBar") ); } - -}
\ No newline at end of file +} diff --git a/exercises/traits/traits2.rs b/exercises/traits/traits2.rs index 7f5014d..b9a13a4 100644 --- a/exercises/traits/traits2.rs +++ b/exercises/traits/traits2.rs @@ -1,12 +1,12 @@ // traits2.rs -// +// // Your task is to implement the trait // `AppendBar' for a vector of strings. -// +// // To implement this trait, consider for // a moment what it means to 'append "Bar"' // to a vector of strings. -// +// // No boiler plate code this time, // you can do this! @@ -31,5 +31,4 @@ mod tests { assert_eq!(foo.pop().unwrap(), String::from("Bar")); assert_eq!(foo.pop().unwrap(), String::from("Foo")); } - } |
