From b793b75f23176b0481ec0f41917084b7accbb667 Mon Sep 17 00:00:00 2001 From: DQ Date: Sun, 3 Sep 2023 14:10:39 +0200 Subject: [PATCH] Clean up redundant doc links (#62) --- cstree/src/interning.rs | 4 ++-- cstree/src/syntax/node.rs | 6 +++--- cstree/src/syntax/resolved.rs | 4 ++-- cstree/src/syntax/token.rs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cstree/src/interning.rs b/cstree/src/interning.rs index 96d4fc1..538dbd7 100644 --- a/cstree/src/interning.rs +++ b/cstree/src/interning.rs @@ -167,7 +167,7 @@ impl fmt::Debug for TokenKey { } } -/// Constructs a new, single-threaded [`Interner`](traits::Interner). +/// Constructs a new, single-threaded [`Interner`]. /// /// If you need the interner to be multi-threaded, see [`new_threaded_interner`]. #[inline] @@ -175,7 +175,7 @@ pub fn new_interner() -> TokenInterner { TokenInterner::new() } -/// Constructs a new [`Interner`](traits::Interner) that can be used across multiple threads. +/// Constructs a new [`Interner`] that can be used across multiple threads. /// /// Note that you can use `&MultiThreadTokenInterner` to access interning methods through a shared reference, as well as /// construct new syntax trees. See [the module documentation](self) for more information and examples. diff --git a/cstree/src/syntax/node.rs b/cstree/src/syntax/node.rs index 30749d0..3b39b98 100644 --- a/cstree/src/syntax/node.rs +++ b/cstree/src/syntax/node.rs @@ -117,15 +117,15 @@ impl SyntaxNode { } } - /// Turns this node into a [`ResolvedNode`](crate::syntax::ResolvedNode), but only if there is a resolver associated - /// with this tree. + /// Turns this node into a [`ResolvedNode`], but only if there is a resolver associated with + /// this tree. #[inline] pub fn try_resolved(&self) -> Option<&ResolvedNode> { // safety: we only coerce if `resolver` exists self.resolver().map(|_| unsafe { ResolvedNode::coerce_ref(self) }) } - /// Turns this node into a [`ResolvedNode`](crate::syntax::ResolvedNode). + /// Turns this node into a [`ResolvedNode`]. /// # Panics /// If there is no resolver associated with this tree. #[inline] diff --git a/cstree/src/syntax/resolved.rs b/cstree/src/syntax/resolved.rs index 5ca6dc7..40e670e 100644 --- a/cstree/src/syntax/resolved.rs +++ b/cstree/src/syntax/resolved.rs @@ -111,8 +111,8 @@ impl DerefMut for ResolvedToken { /// An element of the tree that is guaranteed to belong to a tree that contains an associated /// [`Resolver`](lasso::Resolver), can be either a node or a token. -/// # See also -/// [`SyntaxElement`](crate::syntax::SyntaxElement) +/// +/// See also [`SyntaxElement`]. pub type ResolvedElement = NodeOrToken, ResolvedToken>; impl From> for ResolvedElement { diff --git a/cstree/src/syntax/token.rs b/cstree/src/syntax/token.rs index 6fb68e3..bcd1ff9 100644 --- a/cstree/src/syntax/token.rs +++ b/cstree/src/syntax/token.rs @@ -110,7 +110,7 @@ impl SyntaxToken { self.parent.resolver() } - /// Turns this token into a [`ResolvedToken`](crate::syntax::ResolvedToken), but only if there is a resolver + /// Turns this token into a [`ResolvedToken`], but only if there is a resolver /// associated with this tree. #[inline] pub fn try_resolved(&self) -> Option<&ResolvedToken> { @@ -118,7 +118,7 @@ impl SyntaxToken { self.resolver().map(|_| unsafe { ResolvedToken::coerce_ref(self) }) } - /// Turns this token into a [`ResolvedToken`](crate::syntax::ResolvedToken). + /// Turns this token into a [`ResolvedToken`]. /// # Panics /// If there is no resolver associated with this tree. #[inline]