Use Self more in core in doc when possible

This commit is contained in:
Alexis Bourget 2020-09-23 00:16:16 +02:00
parent b6e72837fd
commit 87a5dec4db
4 changed files with 55 additions and 52 deletions

View file

@ -49,18 +49,18 @@
//! }
//!
//! impl Add for Point {
//! type Output = Point;
//! type Output = Self;
//!
//! fn add(self, other: Point) -> Point {
//! Point {x: self.x + other.x, y: self.y + other.y}
//! fn add(self, other: Self) -> Self {
//! Self {x: self.x + other.x, y: self.y + other.y}
//! }
//! }
//!
//! impl Sub for Point {
//! type Output = Point;
//! type Output = Self;
//!
//! fn sub(self, other: Point) -> Point {
//! Point {x: self.x - other.x, y: self.y - other.y}
//! fn sub(self, other: Self) -> Self {
//! Self {x: self.x - other.x, y: self.y - other.y}
//! }
//! }
//!