Skip to content

Commit c22258c

Browse files
author
Luca Palmieri
committed
Refactor comments.
1 parent 481331d commit c22258c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

jira-wip/src/koans/01_ticket/06_traits.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
mod traits {
22
use crate::path_to_enlightenment::visibility::ticket::Status;
33

4-
/// You might have noticed that in the test for the previous koan
5-
/// we haven't checked if the status returned by `.status()` matched
6-
/// the status we passed to `create_ticket`.
4+
/// You might have noticed that in the test for the previous koan we haven't checked if
5+
/// the status returned by `.status()` matched the status we passed to `create_ticket`.
76
///
8-
/// That's because `assert_eq!(ticket.status(), Status::ToDo)` would have
9-
/// thrown a compiler error:
7+
/// That's because `assert_eq!(ticket.status(), Status::ToDo)` would have failed to compiled:
108
///
119
/// error[E0369]: binary operation `==` cannot be applied to type `&path_to_enlightenment::visibility::ticket::Status`
1210
/// --> jira-wip/src/koans/01_ticket/05_ownership.rs:128:13
@@ -20,7 +18,7 @@ mod traits {
2018
/// = note: an implementation of `std::cmp::PartialEq` might be missing for `&path_to_enlightenment::visibility::ticket::Status`
2119
///
2220
/// `assert_eq` requires that its arguments implement the `PartialEq` trait.
23-
/// What is trait?
21+
/// What is a trait?
2422
/// Traits in Rust are very similar to interfaces in other programming languages:
2523
/// a trait describes a behaviour/capability.
2624
/// For example:
@@ -33,7 +31,7 @@ mod traits {
3331
///
3432
/// In practical terms, a trait defines the signature of a collection of methods.
3533
/// To implement a trait, a struct or an enum have to implement those methods
36-
/// in `impl Trait` block:
34+
/// in an `impl Trait` block:
3735
///
3836
/// ```
3937
/// impl Pay for TaxPayer {

0 commit comments

Comments
 (0)