aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
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)
}