From 355cc7c47608a47bc5664fbc2ff9cabaa227ceaa Mon Sep 17 00:00:00 2001 From: Innes Anderson-Morrison Date: Wed, 12 Jun 2024 06:44:42 +0100 Subject: [PATCH] tidying up doc comments --- src/core/layout/messages.rs | 4 +--- src/extensions/layout/mod.rs | 6 +++--- src/lib.rs | 15 +++++---------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/core/layout/messages.rs b/src/core/layout/messages.rs index 38882392..a3b5af46 100644 --- a/src/core/layout/messages.rs +++ b/src/core/layout/messages.rs @@ -23,7 +23,7 @@ impl Message { /// Marker trait for a type that can be sent as a [Message]. /// -/// The [impl_message][0] macro can be used to easily implement this trait and mark +/// The [impl_message][crate::impl_message] macro can be used to easily implement this trait and mark /// a type as being usable as a layout message: /// ``` /// use penrose::impl_message; @@ -31,8 +31,6 @@ impl Message { /// struct MyMessage; /// impl_message!(MyMessage); /// ``` -/// -/// [0] crate::impl_message pub trait IntoMessage: Any { /// Wrap this value as a dynamically typed message for sending to a layout fn into_message(self) -> Message diff --git a/src/extensions/layout/mod.rs b/src/extensions/layout/mod.rs index a8a914ec..9948f0c2 100644 --- a/src/extensions/layout/mod.rs +++ b/src/extensions/layout/mod.rs @@ -16,7 +16,7 @@ pub use combinators::Conditional; pub mod quickcheck_tests; /// Inspired by the Fibonacci layout available for dwm: -/// https://dwm.suckless.org/patches/fibonacci/ +/// /// /// The ratio between the main and secondary regions can be adjusted by sending [ShrinkMain] /// and [ExpandMain] messages to this layout. @@ -141,7 +141,7 @@ impl Layout for Fibonacci { } /// Inspired by the Tatami layout available for dwm: -/// https://dwm.suckless.org/patches/tatami/ +/// /// /// This is very much a "for looks" layout rather than something particularly practical. It /// provides a set of 6 specific layouts depending on the number of clients present on the @@ -189,7 +189,7 @@ impl Tatami { Self { ratio, ratio_step } } - /// Create a new [Tatami] layout returned as a trait object ready to be added to your [LayoutStack]. + /// Create a new [Tatami] layout returned as a trait object ready to be added to your layout stack. pub fn boxed(ratio: f32, ratio_step: f32) -> Box { Box::new(Tatami { ratio, ratio_step }) } diff --git a/src/lib.rs b/src/lib.rs index 82e32705..7edb150c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,12 +32,12 @@ //! ## Digging into the API //! //! The suggested reading order for getting to grips with the penrose API is to first look at the -//! [pure][7] data structures that represent the logical state of your window manager before digging -//! in to the [core][8] module which contains the majority of the functionality you are likely to +//! [pure] data structures that represent the logical state of your window manager before digging +//! in to the [core] module which contains the majority of the functionality you are likely to //! want to work with. If you are interested in the lower level X11 interactions (or need to make -//! requests to the X server directly) you should check out the [x][9] module and its associated -//! traits. To add functionality and flexability to your window manager, there are the [builtin][10] -//! and [extensions][11] modules which offer capabilities built on top of the rest of penrose. +//! requests to the X server directly) you should check out the [x] module and its associated +//! traits. To add functionality and flexability to your window manager, there are the [builtin] +//! and [extensions] modules which offer capabilities built on top of the rest of penrose. //! //! [1]: https://dwm.suckless.org/ //! [2]: https://xmonad.org/ @@ -45,11 +45,6 @@ //! [4]: https://www.rust-lang.org/learn //! [5]: https://doc.rust-lang.org/book/ //! [6]: https://github.com/sminez/penrose/tree/develop/examples -//! [7]: crate::pure -//! [8]: crate::core -//! [9]: crate::x -//! [10]: crate::builtin -//! [11]: crate::extensions #![warn( clippy::complexity, clippy::correctness,