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::*;
142142/// Hardback,
143143/// Ebook,
144144/// }
145- ///
145+ ///
146146/// struct Book {
147147/// isbn: i32,
148148/// format: BookFormat,
149149/// }
150- ///
150+ ///
151151/// impl PartialEq<BookFormat> for Book {
152152/// fn eq(&self, other: &BookFormat) -> bool {
153153/// self.format == *other
154154/// }
155155/// }
156- ///
156+ ///
157157/// impl PartialEq<Book> for BookFormat {
158158/// fn eq(&self, other: &Book) -> bool {
159159/// *self == other.format
160160/// }
161161/// }
162- ///
162+ ///
163163/// impl PartialEq for Book {
164164/// fn eq(&self, other: &Book) -> bool {
165165/// self.isbn == other.isbn
166166/// }
167167/// }
168- ///
168+ ///
169169/// let b1 = Book { isbn: 3, format: BookFormat::Paperback };
170170/// let b2 = Book { isbn: 3, format: BookFormat::Ebook };
171- ///
171+ ///
172172/// assert!(b1 == BookFormat::Paperback);
173173/// assert!(b1 != BookFormat::Ebook);
174174/// assert!(b1 == b2);
You can’t perform that action at this time.
0 commit comments