Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
geom3trik committed Oct 20, 2023
1 parent 2b2bc80 commit af7cb4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use crate::{LayoutType, Node};
/// The `Cache` is a store which contains the computed size and position of nodes
/// after a layout calculation.
///
/// The `Node` associated type, which implements the [`Node`](crate::Node) trait, provides
/// The `Node` associated type, which implements the [`Node`] trait, provides
/// a [`CacheKey`](crate::Node::CacheKey) associated type which can be used as key for storage types
/// within the cache if the `Node` type itself cannot be used. For example, as the key to a hashmap/slotmap.
pub trait Cache {
/// A type which represents a layout node and implements the [`Node`](crate::Node) trait.
/// A type which represents a layout node and implements the [`Node`] trait.
type Node: Node;
/// Returns the cached width of the given node.
fn width(&self, node: &Self::Node) -> f32;
Expand Down
2 changes: 1 addition & 1 deletion src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub trait Node: Sized {
type ChildIter<'t>: Iterator<Item = &'t Self>
where
Self: 't;
/// A type representing a key to store and retrieve values from the [`Cache`](crate::Cache).
/// A type representing a key to store and retrieve values from the [`Cache`].
type CacheKey;
/// A type representing a context which can be used to save/load state when computing [content size](crate::Node::content_size).
/// For example, a `TextContext` which could be used to measure (and cache) the size of text, which could
Expand Down

0 comments on commit af7cb4f

Please sign in to comment.