summaryrefslogtreecommitdiffstats
path: root/vendor/tracing-subscriber/src/fmt/writer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/tracing-subscriber/src/fmt/writer.rs (renamed from vendor/tracing-subscriber-0.3.3/src/fmt/writer.rs)30
1 files changed, 15 insertions, 15 deletions
diff --git a/vendor/tracing-subscriber-0.3.3/src/fmt/writer.rs b/vendor/tracing-subscriber/src/fmt/writer.rs
index 0974891f7..3fe945566 100644
--- a/vendor/tracing-subscriber-0.3.3/src/fmt/writer.rs
+++ b/vendor/tracing-subscriber/src/fmt/writer.rs
@@ -1,6 +1,6 @@
//! Abstractions for creating [`io::Write`] instances.
//!
-//! [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
+//! [`io::Write`]: std::io::Write
use std::{
fmt,
io::{self, Write},
@@ -96,8 +96,8 @@ use tracing_core::Metadata;
pub trait MakeWriter<'a> {
/// The concrete [`io::Write`] implementation returned by [`make_writer`].
///
- /// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
- /// [`make_writer`]: #tymethod.make_writer
+ /// [`io::Write`]: std::io::Write
+ /// [`make_writer`]: MakeWriter::make_writer
type Writer: io::Write;
/// Returns an instance of [`Writer`].
@@ -109,7 +109,7 @@ pub trait MakeWriter<'a> {
/// creating a [`io::Write`] instance is expensive, be sure to cache it when implementing
/// [`MakeWriter`] to improve performance.
///
- /// [`Writer`]: #associatedtype.Writer
+ /// [`Writer`]: MakeWriter::Writer
/// [`fmt::Layer`]: crate::fmt::Layer
/// [`fmt::Subscriber`]: crate::fmt::Subscriber
/// [`io::Write`]: std::io::Write
@@ -501,13 +501,13 @@ pub trait MakeWriterExt<'a>: MakeWriter<'a> {
/// Writing to [`io::stdout`] and [`io::stderr`] produces the same results as using
/// [`libtest`'s `--nocapture` option][nocapture] which may make the results look unreadable.
///
-/// [`fmt::Subscriber`]: ../struct.Subscriber.html
-/// [`fmt::Layer`]: ../struct.Layer.html
+/// [`fmt::Subscriber`]: super::Subscriber
+/// [`fmt::Layer`]: super::Layer
/// [capturing]: https://doc.rust-lang.org/book/ch11-02-running-tests.html#showing-function-output
/// [nocapture]: https://doc.rust-lang.org/cargo/commands/cargo-test.html
-/// [`io::stdout`]: https://doc.rust-lang.org/std/io/fn.stdout.html
-/// [`io::stderr`]: https://doc.rust-lang.org/std/io/fn.stderr.html
-/// [`print!`]: https://doc.rust-lang.org/std/macro.print.html
+/// [`io::stdout`]: std::io::stdout
+/// [`io::stderr`]: std::io::stderr
+/// [`print!`]: std::print!
#[derive(Default, Debug)]
pub struct TestWriter {
_p: (),
@@ -646,10 +646,9 @@ pub struct Tee<A, B> {
/// requires the `Writer` type to implement [`io::Write`], it's necessary to add
/// a newtype that forwards the trait implementation.
///
-/// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
-/// [`MutexGuard`]: https://doc.rust-lang.org/std/sync/struct.MutexGuard.html
-/// [`Mutex`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html
-/// [`MakeWriter`]: trait.MakeWriter.html
+/// [`io::Write`]: std::io::Write
+/// [`MutexGuard`]: std::sync::MutexGuard
+/// [`Mutex`]: std::sync::Mutex
#[derive(Debug)]
pub struct MutexGuardWriter<'a, W>(MutexGuard<'a, W>);
@@ -689,7 +688,7 @@ where
{
type Writer = &'a W;
fn make_writer(&'a self) -> Self::Writer {
- &*self
+ self
}
}
@@ -734,7 +733,6 @@ impl<'a> MakeWriter<'a> for TestWriter {
impl BoxMakeWriter {
/// Constructs a `BoxMakeWriter` wrapping a type implementing [`MakeWriter`].
///
- /// [`MakeWriter`]: trait.MakeWriter.html
pub fn new<M>(make_writer: M) -> Self
where
M: for<'a> MakeWriter<'a> + Send + Sync + 'static,
@@ -1025,6 +1023,8 @@ impl<A, B> Tee<A, B> {
/// outputs.
///
/// See the documentation for [`MakeWriterExt::and`] for details.
+ ///
+ /// [writers]: std::io::Write
pub fn new(a: A, b: B) -> Self {
Self { a, b }
}