Fix bad method links in docstrings (#13471)

# Description

Seems like I developed a bit of a bad habit of trying to link

```rust
/// [`.foo()`]
```

in docstrings, and this just doesn't work automatically; you have to do 

```rust
/// [`.foo()`](Self::foo)
```

if you want it to actually link. I think I found and replaced all of
these.

# User-Facing Changes

Just docs.
This commit is contained in:
Devyn Cairns
2024-07-27 19:39:29 -07:00
committed by GitHub
parent d80de68665
commit d618fd0527
15 changed files with 40 additions and 37 deletions

View File

@ -832,9 +832,9 @@ impl EngineState {
/// Optionally get a block by id, if it exists
///
/// Prefer to use [`.get_block()`] in most cases - `BlockId`s that don't exist are normally a
/// compiler error. This only exists to stop plugins from crashing the engine if they send us
/// something invalid.
/// Prefer to use [`.get_block()`](Self::get_block) in most cases - `BlockId`s that don't exist
/// are normally a compiler error. This only exists to stop plugins from crashing the engine if
/// they send us something invalid.
pub fn try_get_block(&self, block_id: BlockId) -> Option<&Arc<Block>> {
self.blocks.get(block_id)
}

View File

@ -51,7 +51,7 @@ pub struct Stack {
pub parent_stack: Option<Arc<Stack>>,
/// Variables that have been deleted (this is used to hide values from parent stack lookups)
pub parent_deletions: Vec<VarId>,
/// Locally updated config. Use [`.get_config()`] to access correctly.
/// Locally updated config. Use [`.get_config()`](Self::get_config) to access correctly.
pub config: Option<Arc<Config>>,
pub(crate) out_dest: StackOutDest,
}

View File

@ -37,7 +37,8 @@ pub struct LabeledError {
impl LabeledError {
/// Create a new plain [`LabeledError`] with the given message.
///
/// This is usually used builder-style with methods like [`.with_label()`] to build an error.
/// This is usually used builder-style with methods like [`.with_label()`](Self::with_label) to
/// build an error.
///
/// # Example
///

View File

@ -117,7 +117,8 @@ impl PipelineData {
/// Get a type that is representative of the `PipelineData`.
///
/// The type returned here makes no effort to collect a stream, so it may be a different type
/// than would be returned by [`Value::get_type()`] on the result of [`.into_value()`].
/// than would be returned by [`Value::get_type()`] on the result of
/// [`.into_value()`](Self::into_value).
///
/// Specifically, a `ListStream` results in [`list stream`](Type::ListStream) rather than
/// the fully complete [`list`](Type::List) type (which would require knowing the contents),