Use recently stabilized intra-doc links

See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
This commit is contained in:
Héctor Ramón Jiménez 2020-11-25 07:11:27 +01:00
parent d612bf5678
commit 01322f69a4
135 changed files with 135 additions and 1769 deletions

View file

@ -12,8 +12,6 @@ pub use node::Node;
use crate::{Point, Rectangle, Vector};
/// The bounds of a [`Node`] and its children, using absolute coordinates.
///
/// [`Node`]: struct.Node.html
#[derive(Debug, Clone, Copy)]
pub struct Layout<'a> {
position: Point,
@ -35,8 +33,6 @@ impl<'a> Layout<'a> {
}
/// Returns the position of the [`Layout`].
///
/// [`Layout`]: struct.Layout.html
pub fn position(&self) -> Point {
self.position
}
@ -45,10 +41,6 @@ impl<'a> Layout<'a> {
///
/// The returned [`Rectangle`] describes the position and size of a
/// [`Node`].
///
/// [`Layout`]: struct.Layout.html
/// [`Rectangle`]: struct.Rectangle.html
/// [`Node`]: struct.Node.html
pub fn bounds(&self) -> Rectangle {
let bounds = self.node.bounds();
@ -61,9 +53,6 @@ impl<'a> Layout<'a> {
}
/// Returns an iterator over the [`Layout`] of the children of a [`Node`].
///
/// [`Layout`]: struct.Layout.html
/// [`Node`]: struct.Node.html
pub fn children(self) -> impl Iterator<Item = Layout<'a>> {
self.node.children().iter().map(move |node| {
Layout::with_offset(