aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorA-Walrus2022-09-03 14:58:16 +0000
committerGitHub2022-09-03 14:58:16 +0000
commitc93d52cc8a8fd4aafcdbe13c0684d9ddec68ef90 (patch)
tree5b8c1cddc5de890f730d46f0973be820f6a0d158 /helix-view/src
parent59f7b07c86309083c24b9c8858a9abe0dc3d68c8 (diff)
Fix cargo doc warnings, and add GitHub action to ensure it (#3650)
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/tree.rs14
1 files changed, 7 insertions, 7 deletions
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)
}