File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -142,33 +142,33 @@ use self::Ordering::*;
142
142
/// Hardback,
143
143
/// Ebook,
144
144
/// }
145
- ///
145
+ ///
146
146
/// struct Book {
147
147
/// isbn: i32,
148
148
/// format: BookFormat,
149
149
/// }
150
- ///
150
+ ///
151
151
/// impl PartialEq<BookFormat> for Book {
152
152
/// fn eq(&self, other: &BookFormat) -> bool {
153
153
/// self.format == *other
154
154
/// }
155
155
/// }
156
- ///
156
+ ///
157
157
/// impl PartialEq<Book> for BookFormat {
158
158
/// fn eq(&self, other: &Book) -> bool {
159
159
/// *self == other.format
160
160
/// }
161
161
/// }
162
- ///
162
+ ///
163
163
/// impl PartialEq for Book {
164
164
/// fn eq(&self, other: &Book) -> bool {
165
165
/// self.isbn == other.isbn
166
166
/// }
167
167
/// }
168
- ///
168
+ ///
169
169
/// let b1 = Book { isbn: 3, format: BookFormat::Paperback };
170
170
/// let b2 = Book { isbn: 3, format: BookFormat::Ebook };
171
- ///
171
+ ///
172
172
/// assert!(b1 == BookFormat::Paperback);
173
173
/// assert!(b1 != BookFormat::Ebook);
174
174
/// assert!(b1 == b2);
You can’t perform that action at this time.
0 commit comments