Skip to content

Commit

Permalink
Resolve rustdoc warnings
Browse files Browse the repository at this point in the history
There were various cases of redundant explicit rustdoc links.
  • Loading branch information
athre0z committed Oct 22, 2023
1 parent 47d5af3 commit 29a7a90
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ impl Default for ColorScheme {
#[deprecated(since = "0.4.0", note = "Use `BacktracePrinter` instead.")]
pub type Settings = BacktracePrinter;

/// Pretty-printer for backtraces and [`PanicInfo`](PanicInfo) structs.
/// Pretty-printer for backtraces and [`PanicInfo`] structs.
#[derive(Clone)]
pub struct BacktracePrinter {
message: String,
Expand Down Expand Up @@ -631,8 +631,7 @@ impl BacktracePrinter {
/// Install the `color_backtrace` handler with default settings.
///
/// Output streams can be created via `default_output_stream()` or
/// using any other stream that implements
/// [`termcolor::WriteColor`](termcolor::WriteColor).
/// using any other stream that implements [`termcolor::WriteColor`].
pub fn install(self, out: impl WriteColor + Sync + Send + 'static) {
std::panic::set_hook(self.into_panic_handler(out))
}
Expand All @@ -656,7 +655,7 @@ impl BacktracePrinter {
})
}

/// Pretty-prints a [`backtrace::Backtrace`](backtrace::Backtrace) to an output stream.
/// Pretty-prints a [`backtrace::Backtrace`] to an output stream.
pub fn print_trace(&self, trace: &backtrace::Backtrace, out: &mut impl WriteColor) -> IOResult {
writeln!(out, "{:━^80}", " BACKTRACE ")?;

Expand Down Expand Up @@ -736,7 +735,7 @@ impl BacktracePrinter {
Ok(String::from_utf8(ansi.into_inner()).unwrap())
}

/// Pretty-prints a [`PanicInfo`](PanicInfo) struct to an output stream.
/// Pretty-prints a [`PanicInfo`] struct to an output stream.
pub fn print_panic_info(&self, pi: &PanicInfo, out: &mut impl WriteColor) -> IOResult {
out.set_color(&self.colors.header)?;
writeln!(out, "{}", self.message)?;
Expand Down

0 comments on commit 29a7a90

Please sign in to comment.