Skip to content

Commit

Permalink
refactor(docs): Use intra-doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Feb 13, 2024
1 parent 1b0f4dd commit 62713d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
5 changes: 1 addition & 4 deletions src/fmt/humantime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ impl Formatter {
/// writeln!(buf, "{}: {}: {}", ts, record.level(), record.args())
/// });
/// ```
///
/// [`Timestamp`]: struct.Timestamp.html
pub fn timestamp(&self) -> Timestamp {
Timestamp {
time: SystemTime::now(),
Expand Down Expand Up @@ -76,8 +74,7 @@ impl Formatter {
/// The timestamp implements [`Display`] and can be written to a [`Formatter`].
///
/// [RFC3339]: https://www.ietf.org/rfc/rfc3339.txt
/// [`Display`]: https://doc.rust-lang.org/stable/std/fmt/trait.Display.html
/// [`Formatter`]: struct.Formatter.html
/// [`Display`]: std::fmt::Display
pub struct Timestamp {
time: SystemTime,
precision: TimestampPrecision,
Expand Down
14 changes: 4 additions & 10 deletions src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
//! });
//! ```
//!
//! [`Formatter`]: struct.Formatter.html
//! [`Style`]: struct.Style.html
//! [`Builder::format`]: ../struct.Builder.html#method.format
//! [`Write`]: https://doc.rust-lang.org/stable/std/io/trait.Write.html
//! [`Builder::format`]: crate::Builder::format
//! [`Write`]: std::io::Write

use std::cell::RefCell;
use std::fmt::Display;
Expand Down Expand Up @@ -95,8 +93,8 @@ impl Default for TimestampPrecision {
/// builder.format(|buf, record| writeln!(buf, "{}: {}", record.level(), record.args()));
/// ```
///
/// [`Write`]: https://doc.rust-lang.org/stable/std/io/trait.Write.html
/// [`writeln`]: https://doc.rust-lang.org/stable/std/macro.writeln.html
/// [`Write`]: std::io::Write
/// [`writeln`]: std::writeln
/// [`style`]: #method.style
pub struct Formatter {
buf: Rc<RefCell<Buffer>>,
Expand Down Expand Up @@ -240,10 +238,6 @@ type SubtleStyle = StyledValue<&'static str>;
type SubtleStyle = &'static str;

/// A value that can be printed using the given styles.
///
/// It is the result of calling [`Style::value`].
///
/// [`Style::value`]: struct.Style.html#method.value
#[cfg(feature = "color")]
struct StyledValue<T> {
style: style::Style,
Expand Down
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@
//! [gh-repo-examples]: https://github.com/rust-cli/env_logger/tree/main/examples
//! [level-enum]: https://docs.rs/log/latest/log/enum.Level.html
//! [log-crate-url]: https://docs.rs/log
//! [`Builder`]: struct.Builder.html
//! [`Builder::is_test`]: struct.Builder.html#method.is_test
//! [`Env`]: struct.Env.html
//! [`fmt`]: fmt/index.html

#![doc(
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
Expand Down

0 comments on commit 62713d1

Please sign in to comment.