From 6f975ca404906004d62e86c0d905a3c067761da8 Mon Sep 17 00:00:00 2001 From: Iain Date: Tue, 19 Sep 2023 14:58:17 +1200 Subject: [PATCH] Fix backticks in doc comments --- src/formatters.rs | 10 +++++----- src/midi.rs | 2 +- src/params.rs | 2 +- src/params/float.rs | 2 +- src/params/smoothing.rs | 8 ++++---- src/wrapper/clap/context.rs | 2 +- src/wrapper/clap/descriptor.rs | 2 +- src/wrapper/standalone/context.rs | 2 +- src/wrapper/state.rs | 2 +- src/wrapper/vst3/util.rs | 2 +- src/wrapper/vst3/view.rs | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/formatters.rs b/src/formatters.rs index 8e6f4667..52c3e2cd 100644 --- a/src/formatters.rs +++ b/src/formatters.rs @@ -78,7 +78,7 @@ pub fn s2v_compression_ratio() -> Arc Option + Send + Sync> } /// Turn an `f32` value from voltage gain to decibels using the semantics described in -/// [`util::gain_to_db()]. You should use either `" dB"` or `" dBFS"` for the parameter's unit. +/// [`util::gain_to_db()`]. You should use either `" dB"` or `" dBFS"` for the parameter's unit. /// `0.0` will be formatted as `-inf`. Avoids returning negative zero values to make sure /// string->value->string roundtrips work correctly. Otherwise `-0.001` rounded to two digits /// would result in `-0.00`. @@ -125,7 +125,7 @@ pub fn v2s_f32_panning() -> Arc String + Send + Sync> { }) } -/// Parse a pan value in the format of [`v2s_f32_panning()] to a linear value in the range `[-1, +/// Parse a pan value in the format of [`v2s_f32_panning()`] to a linear value in the range `[-1, /// 1]`. pub fn s2v_f32_panning() -> Arc Option + Send + Sync> { Arc::new(|string| { @@ -196,7 +196,7 @@ pub fn v2s_f32_hz_then_khz_with_note_name( }) } -/// Convert an input in the same format at that of [`v2s_f32_hz_then_khz()] to a Hertz value. This +/// Convert an input in the same format at that of [`v2s_f32_hz_then_khz()`] to a Hertz value. This /// additionally also accepts note names in the same format as [`s2v_i32_note_formatter()`], and /// optionally also with cents in the form of `D#5, -23 ct.`. pub fn s2v_f32_hz_then_khz() -> Arc Option + Send + Sync> { @@ -277,7 +277,7 @@ pub fn v2s_i32_note_formatter() -> Arc String + Send + Sync> { }) } -/// Parse a note name to a MIDI number using the inverse mapping from [`v2s_i32_note_formatter()]. +/// Parse a note name to a MIDI number using the inverse mapping from [`v2s_i32_note_formatter()`]. pub fn s2v_i32_note_formatter() -> Arc Option + Send + Sync> { Arc::new(|string| { let string = string.trim(); @@ -322,7 +322,7 @@ pub fn v2s_bool_bypass() -> Arc String + Send + Sync> { }) } -/// Parse a string in the same format as [`v2s_bool_bypass()]. +/// Parse a string in the same format as [`v2s_bool_bypass()`]. pub fn s2v_bool_bypass() -> Arc Option + Send + Sync> { Arc::new(|string| { let string = string.trim(); diff --git a/src/midi.rs b/src/midi.rs index 15279d2b..77848258 100644 --- a/src/midi.rs +++ b/src/midi.rs @@ -11,7 +11,7 @@ pub use midi_consts::channel_event::control_change; /// A plugin-specific note event type. /// -/// The reason why this is defined like this instead of parameterizing `NoteEvent` with `P`` is +/// The reason why this is defined like this instead of parameterizing `NoteEvent` with `P` is /// because deriving trait bounds requires all of the plugin's generic parameters to implement those /// traits. And we can't require `P` to implement things like `Clone`. /// diff --git a/src/params.rs b/src/params.rs index a016e018..ea23e349 100644 --- a/src/params.rs +++ b/src/params.rs @@ -177,7 +177,7 @@ pub trait Param: Display + Debug + sealed::Sealed { /// Get the plain, unnormalized value for this parameter after polyphonic modulation has been /// applied. This is a convenience method for calling [`preview_plain()`][Self::preview_plain()] - /// with `unmodulated_normalized_value() + normalized_offset`.` + /// with `unmodulated_normalized_value() + normalized_offset`. #[inline] fn preview_modulated(&self, normalized_offset: f32) -> Self::Plain { self.preview_plain(self.unmodulated_normalized_value() + normalized_offset) diff --git a/src/params/float.rs b/src/params/float.rs index 9d94dea5..63348aa4 100644 --- a/src/params/float.rs +++ b/src/params/float.rs @@ -357,7 +357,7 @@ impl FloatParam { self } - /// Set the distance between steps of a [FloatParam]. Mostly useful for quantizing GUI input. If + /// Set the distance between steps of a [`FloatParam`]. Mostly useful for quantizing GUI input. If /// this is set and a [`value_to_string`][Self::with_value_to_string()] function is not set, /// then this is also used when formatting the parameter. This must be a positive, nonzero /// number. diff --git a/src/params/smoothing.rs b/src/params/smoothing.rs index 33f4c428..78c101dd 100644 --- a/src/params/smoothing.rs +++ b/src/params/smoothing.rs @@ -661,7 +661,7 @@ mod tests { assert_eq!(smoother.next(), 20); } - /// Same as [linear_f32_smoothing], but skipping steps instead. + /// Same as [`linear_f32_smoothing`], but skipping steps instead. #[test] fn skipping_linear_f32_smoothing() { let smoother: Smoother = Smoother::new(SmoothingStyle::Linear(100.0)); @@ -674,7 +674,7 @@ mod tests { assert_eq!(smoother.next(), 20.0); } - /// Same as [linear_i32_smoothing], but skipping steps instead. + /// Same as [`linear_i32_smoothing`], but skipping steps instead. #[test] fn skipping_linear_i32_smoothing() { let smoother: Smoother = Smoother::new(SmoothingStyle::Linear(100.0)); @@ -687,7 +687,7 @@ mod tests { assert_eq!(smoother.next(), 20); } - /// Same as [logarithmic_f32_smoothing], but skipping steps instead. + /// Same as [`logarithmic_f32_smoothing`], but skipping steps instead. #[test] fn skipping_logarithmic_f32_smoothing() { let smoother: Smoother = Smoother::new(SmoothingStyle::Logarithmic(100.0)); @@ -700,7 +700,7 @@ mod tests { assert_eq!(smoother.next(), 20.0); } - /// Same as [logarithmic_i32_smoothing], but skipping steps instead. + /// Same as [`logarithmic_i32_smoothing`], but skipping steps instead. #[test] fn skipping_logarithmic_i32_smoothing() { let smoother: Smoother = Smoother::new(SmoothingStyle::Logarithmic(100.0)); diff --git a/src/wrapper/clap/context.rs b/src/wrapper/clap/context.rs index 6f95ac28..e15f5b77 100644 --- a/src/wrapper/clap/context.rs +++ b/src/wrapper/clap/context.rs @@ -37,7 +37,7 @@ pub(crate) struct PendingInitContextRequests { /// A [`ProcessContext`] implementation for the wrapper. This is a separate object so it can hold on /// to lock guards for event queues. Otherwise reading these events would require constant -/// unnecessary atomic operations to lock the uncontested RwLocks. +/// unnecessary atomic operations to lock the uncontested `RwLock`s. pub(crate) struct WrapperProcessContext<'a, P: ClapPlugin> { pub(super) wrapper: &'a Wrapper

, pub(super) input_events_guard: AtomicRefMut<'a, VecDeque>>, diff --git a/src/wrapper/clap/descriptor.rs b/src/wrapper/clap/descriptor.rs index 1938690f..f6ed2e1d 100644 --- a/src/wrapper/clap/descriptor.rs +++ b/src/wrapper/clap/descriptor.rs @@ -9,7 +9,7 @@ use crate::prelude::ClapPlugin; /// itself. /// /// This cannot be cloned as [`Self::clap_features_ptrs`] contains pointers to -/// [Self::clap_features]. +/// [`Self::clap_features`]. pub struct PluginDescriptor { // We need [CString]s for all of `ClapPlugin`'s `&str` fields clap_id: CString, diff --git a/src/wrapper/standalone/context.rs b/src/wrapper/standalone/context.rs index 5c851a58..86bd639f 100644 --- a/src/wrapper/standalone/context.rs +++ b/src/wrapper/standalone/context.rs @@ -14,7 +14,7 @@ pub(crate) struct WrapperInitContext<'a, P: Plugin, B: Backend

> { /// A [`ProcessContext`] implementation for the standalone wrapper. This is a separate object so it /// can hold on to lock guards for event queues. Otherwise reading these events would require -/// constant unnecessary atomic operations to lock the uncontested RwLocks. +/// constant unnecessary atomic operations to lock the uncontested `RwLock`s. pub(crate) struct WrapperProcessContext<'a, P: Plugin, B: Backend

> { #[allow(dead_code)] pub(super) wrapper: &'a Wrapper, diff --git a/src/wrapper/state.rs b/src/wrapper/state.rs index b9bad7f7..62b166a4 100644 --- a/src/wrapper/state.rs +++ b/src/wrapper/state.rs @@ -1,4 +1,4 @@ -//! Utilities for saving a [crate::plugin::Plugin]'s state. The actual state object is also exposed +//! Utilities for saving a [`crate::plugin::Plugin`]'s state. The actual state object is also exposed //! to plugins through the [`GuiContext`][crate::prelude::GuiContext]. use anyhow::{Context, Result}; diff --git a/src/wrapper/vst3/util.rs b/src/wrapper/vst3/util.rs index bb632998..fb02eaa3 100644 --- a/src/wrapper/vst3/util.rs +++ b/src/wrapper/vst3/util.rs @@ -65,7 +65,7 @@ pub struct VstPtr { ptr: vst3_sys::VstPtr, } -/// The same as [`VstPtr`] with shared semnatics, but for objects we defined ourself since VstPtr +/// The same as [`VstPtr`] with shared semnatics, but for objects we defined ourself since `VstPtr` /// only works for interfaces. #[repr(transparent)] pub struct ObjectPtr { diff --git a/src/wrapper/vst3/view.rs b/src/wrapper/vst3/view.rs index e40ce80a..6f737ce3 100644 --- a/src/wrapper/vst3/view.rs +++ b/src/wrapper/vst3/view.rs @@ -114,7 +114,7 @@ impl WrapperView

{ ) } - /// Ask the host to resize the view to the size specified by [Editor::size()]. Will return false + /// Ask the host to resize the view to the size specified by [`Editor::size()`]. Will return false /// if the host doesn't like you. This **needs** to be run from the GUI thread. /// /// # Safety