From c93d52cc8a8fd4aafcdbe13c0684d9ddec68ef90 Mon Sep 17 00:00:00 2001 From: A-Walrus Date: Sat, 3 Sep 2022 17:58:16 +0300 Subject: Fix cargo doc warnings, and add GitHub action to ensure it (#3650) --- helix-view/src/tree.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'helix-view/src') diff --git a/helix-view/src/tree.rs b/helix-view/src/tree.rs index 72f6af57..a1977764 100644 --- a/helix-view/src/tree.rs +++ b/helix-view/src/tree.rs @@ -270,18 +270,18 @@ impl Tree { }) } - /// Get reference to a [`view`] by index. + /// Get reference to a [View] by index. /// # Panics /// - /// Panics if `index` is not in self.nodes, or if the node's content is not [`Content::View`] . This can be checked with [`contains`] + /// Panics if `index` is not in self.nodes, or if the node's content is not [Content::View]. This can be checked with [Self::contains]. pub fn get(&self, index: ViewId) -> &View { self.try_get(index).unwrap() } - /// Try to get reference to a [`view`] by index. Returns `None` if node content is not a [`Content::View`] + /// Try to get reference to a [View] by index. Returns `None` if node content is not a [Content::View] /// # Panics /// - /// Panics if `index` is not in self.nodes. This can be checked with [`Self::contains`] + /// Panics if `index` is not in self.nodes. This can be checked with [Self::contains] pub fn try_get(&self, index: ViewId) -> Option<&View> { match &self.nodes[index] { Node { @@ -292,10 +292,10 @@ impl Tree { } } - /// Get a mutable reference to a [`view`] by index. + /// Get a mutable reference to a [View] by index. /// # Panics /// - /// Panics if `index` is not in self.nodes, or if the node's content is not [`Content::View`] . This can be checked with [`Self::contains`] + /// Panics if `index` is not in self.nodes, or if the node's content is not [Content::View]. This can be checked with [Self::contains]. pub fn get_mut(&mut self, index: ViewId) -> &mut View { match &mut self.nodes[index] { Node { @@ -306,7 +306,7 @@ impl Tree { } } - /// Check if tree contains a [`Node`] with a given index. + /// Check if tree contains a [Node] with a given index. pub fn contains(&self, index: ViewId) -> bool { self.nodes.contains_key(index) } -- cgit v1.2.3-70-g09d2