diff --git a/src/vec.rs b/src/vec.rs index b394c2c..98bb8e3 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -64,7 +64,7 @@ impl XY { Vec2::new(0, self.y) } - /// Alias for Vec::new(0,0). + /// Alias for `Vec2::new(0,0)`. pub fn zero() -> Self { Vec2::new(0, 0) } diff --git a/src/xy.rs b/src/xy.rs index e09639e..b0934b4 100644 --- a/src/xy.rs +++ b/src/xy.rs @@ -27,7 +27,7 @@ impl XY { (self.x, self.y) } - /// Return a XY with references to this one's values. + /// Return a `XY` with references to this one's values. pub fn as_ref(&self) -> XY<&T> { XY::new(&self.x, &self.y) } @@ -45,14 +45,14 @@ impl XY { } } - /// Returns a new XY by calling `f` on `self` and `other` for each axis. + /// Returns a new `XY` by calling `f` on `self` and `other` for each axis. pub fn zip_map V>(self, other: XY, f: F) -> XY { XY::new(f(self.x, other.x), f(self.y, other.y)) } } impl XY> { - /// Returns a new XY by calling `unwrap_or` on each axis. + /// Returns a new `XY` by calling `unwrap_or` on each axis. pub fn unwrap_or(self, other: XY) -> XY { self.zip_map(other, |s, o| s.unwrap_or(o)) } diff --git a/update_doc.sh b/update_doc.sh index bcb02ac..9e871f3 100755 --- a/update_doc.sh +++ b/update_doc.sh @@ -3,7 +3,7 @@ set -e cargo doc FROM=$(git rev-parse --short HEAD) git checkout gh-pages -git fetch && git rebase +git fetch && git rebase origin/gh-pages rsync -a target/doc/ . git add . git commit -m "Update doc for ${FROM}"