From f98e36cee514f643e0fe256857cf31e2e0f24080 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sat, 1 Jul 2023 16:20:59 +0300 Subject: [PATCH] melib: Replace old-style /*! module doc comments with //! --- melib/src/email.rs | 150 ++++++++++++------------ melib/src/email/compose.rs | 4 +- melib/src/email/headers.rs | 2 +- melib/src/email/headers/names.rs | 2 +- melib/src/email/list_management.rs | 3 +- melib/src/email/parser.rs | 16 +-- melib/src/email/pgp.rs | 7 +- melib/src/error.rs | 4 +- melib/src/sieve.rs | 2 +- melib/src/text_processing/line_break.rs | 7 +- melib/src/thread.rs | 26 ++-- src/command.rs | 5 +- src/components.rs | 14 +-- src/components/utilities.rs | 3 +- src/components/utilities/tables.rs | 2 +- src/conf.rs | 2 +- src/conf/accounts.rs | 4 +- src/plugins.rs | 4 +- src/sqlite3.rs | 3 +- src/terminal/cells.rs | 6 +- src/terminal/position.rs | 8 +- 21 files changed, 130 insertions(+), 144 deletions(-) diff --git a/melib/src/email.rs b/melib/src/email.rs index f18cf6911..68d99b548 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -19,82 +19,80 @@ * along with meli. If not, see . */ -/*! - * Email parsing and composing. - * - * # Parsing bytes into an `Envelope` - * - * An [`Envelope`](Envelope) represents the information you can get from an - * email's headers and body structure. Addresses in `To`, `From` fields etc - * are parsed into [`Address`](crate::email::Address) types. - * - * ``` - * use melib::{Attachment, Envelope}; - * - * let raw_mail = r#"From: "some name" - * To: "me" - * Cc: - * Subject: =?utf-8?Q?gratuitously_encoded_subject?= - * Message-ID: - * MIME-Version: 1.0 - * Content-Type: multipart/mixed; charset="utf-8"; - * boundary="bzz_bzz__bzz__" - * - * This is a MIME formatted message with attachments. Use a MIME-compliant client to view it properly. - * --bzz_bzz__bzz__ - * - * hello world. - * --bzz_bzz__bzz__ - * Content-Type: image/gif; name="test_image.gif"; charset="utf-8" - * Content-Disposition: attachment - * Content-Transfer-Encoding: base64 - * - * R0lGODdhKAAXAOfZAAABzAADzQAEzgQFtBEAxAAGxBcAxwALvRcFwAAPwBcLugATuQEUuxoNuxYQ - * sxwOvAYVvBsStSAVtx8YsRUcuhwhth4iuCQsyDAwuDc1vTc3uDg4uT85rkc9ukJBvENCvURGukdF - * wUVKt0hLuUxPvVZSvFlYu1hbt2BZuFxdul5joGhqlnNuf3FvlnBvwXJyt3Jxw3N0oXx1gH12gV99 - * z317f3N7spFxwHp5wH99gYB+goF/g25+26tziIOBhWqD3oiBjICAuudkjIN+zHeC2n6Bzc1vh4eF - * iYaBw8F0kImHi4KFxYyHmIWIvI2Lj4uIvYaJyY+IuJGMi5iJl4qKxZSMmIuLxpONnpGPk42NvI2M - * 1LKGl46OvZePm5ORlZiQnJqSnpaUmLyJnJuTn5iVmZyUoJGVyZ2VoZSVw5iXoZmWrO18rJiUyp6W - * opuYnKaVnZ+Xo5yZncaMoaCYpJiaqo+Z2Z2annuf5qGZpa2WoJybpZmayZ2Z0KCZypydrZ6dp6Cd - * oZ6a0aGay5ucy5+eqKGeouWMgp+b0qKbzKCfqdqPnp2ezaGgqqOgpKafqrScpp+gz6ajqKujr62j - * qayksKmmq62lsaiosqqorOyWnaqqtKeqzLGptaurta2rr7Kqtq+ssLOrt6+uuLGusuqhfbWtubCv - * ubKvs7GwurOwtPSazbevu+ali7SxtbiwvOykjLOyvLWytuCmqOankrSzvbazuLmyvrW0vre0uba1 - * wLi1ury0wLm2u721wbe3wbq3vMC2vLi4wr+3w7m5w8C4xLi6yry6vsG5xbu7xcC6zMK6xry8xry+ - * u8O7x729x8C9wb++yMG+wsO+vMK/w8a+y8e/zMnBzcXH18nL2/////////////////////////// - * //////////////////////////////////////////////////////////////////////////// - * /////////////////////////////////////////////////////ywAAAAAKAAXAAAI/gBP4Cjh - * IYMLEh0w4EgBgsMLEyFGFBEB5cOFABgzatS4AVssZAOsLOHCxooVMzCyoNmzaBOkJlS0VEDyZMjG - * mxk3XOMF60CDBgsoPABK9KcDCRImPCiQYAECAgQCRMU4VSrGCjFarBgUSJCgQ10FBTrkNRCfPnz4 - * dA3UNa1btnDZqgU7Ntqzu3ej2X2mFy9eaHuhNRtMGJrhwYYN930G2K7eaNIY34U2mfJkwpgzI9Yr - * GBqwR2KSvAlMOXHnw5pTNzPdLNoWIWtU9XjGjDEYS8LAlFm1SrVvzIKj5TH0KpORSZOryPgCZgqL - * Ob+jG0YVRBErUrOiiGJ8KxgtYsh27xWL/tswnTtEbsiRVYdJNMHk4yOGhswGjR88UKjQ9Ey+/8TL - * XKKGGn7Akph/8XX2WDTTcAYfguVt9hhrEPqmzIOJ3VUheb48WJiHG6amC4i+WVJKKCimqGIoYxyj - * WWK8kKjaJ9bA18sxvXjYhourmbbMMrjI+OIn1QymDCVXANGFK4S1gQw0PxozzC+33FLLKUJq9gk1 - * gyWDhyNwrMLkYGUEM4wvuLRiCiieXIJJJVlmJskcZ9TZRht1lnFGGmTMkMoonVQSSSOFAGJHHI0w - * ouiijDaaCCGQRgrpH3q4QYYXWDihxBE+7KCDDjnUIEVAADs= - * --bzz_bzz__bzz__--"#; - * - * let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail"); - * assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject"); - * assert_eq!( - * envelope.message_id_display().as_ref(), - * "" - * ); - * - * let body = envelope.body_bytes(raw_mail.as_bytes()); - * assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed"); - * - * let body_text = body.text(); - * assert_eq!(body_text.as_str(), "hello world."); - * - * let subattachments: Vec = body.attachments(); - * assert_eq!(subattachments.len(), 3); - * assert_eq!( - * subattachments[2].content_type().name().unwrap(), - * "test_image.gif" - * ); - * ``` - */ +//! Email parsing and composing. +//! +//! # Parsing bytes into an `Envelope` +//! +//! An [`Envelope`](Envelope) represents the information you can get from an +//! email's headers and body structure. Addresses in `To`, `From` fields etc +//! are parsed into [`Address`](crate::email::Address) types. +//! +//! ``` +//! use melib::{Attachment, Envelope}; +//! +//! let raw_mail = r#"From: "some name" +//! To: "me" +//! Cc: +//! Subject: =?utf-8?Q?gratuitously_encoded_subject?= +//! Message-ID: +//! MIME-Version: 1.0 +//! Content-Type: multipart/mixed; charset="utf-8"; +//! boundary="bzz_bzz__bzz__" +//! +//! This is a MIME formatted message with attachments. Use a MIME-compliant client to view it properly. +//! --bzz_bzz__bzz__ +//! +//! hello world. +//! --bzz_bzz__bzz__ +//! Content-Type: image/gif; name="test_image.gif"; charset="utf-8" +//! Content-Disposition: attachment +//! Content-Transfer-Encoding: base64 +//! +//! R0lGODdhKAAXAOfZAAABzAADzQAEzgQFtBEAxAAGxBcAxwALvRcFwAAPwBcLugATuQEUuxoNuxYQ +//! sxwOvAYVvBsStSAVtx8YsRUcuhwhth4iuCQsyDAwuDc1vTc3uDg4uT85rkc9ukJBvENCvURGukdF +//! wUVKt0hLuUxPvVZSvFlYu1hbt2BZuFxdul5joGhqlnNuf3FvlnBvwXJyt3Jxw3N0oXx1gH12gV99 +//! z317f3N7spFxwHp5wH99gYB+goF/g25+26tziIOBhWqD3oiBjICAuudkjIN+zHeC2n6Bzc1vh4eF +//! iYaBw8F0kImHi4KFxYyHmIWIvI2Lj4uIvYaJyY+IuJGMi5iJl4qKxZSMmIuLxpONnpGPk42NvI2M +//! 1LKGl46OvZePm5ORlZiQnJqSnpaUmLyJnJuTn5iVmZyUoJGVyZ2VoZSVw5iXoZmWrO18rJiUyp6W +//! opuYnKaVnZ+Xo5yZncaMoaCYpJiaqo+Z2Z2annuf5qGZpa2WoJybpZmayZ2Z0KCZypydrZ6dp6Cd +//! oZ6a0aGay5ucy5+eqKGeouWMgp+b0qKbzKCfqdqPnp2ezaGgqqOgpKafqrScpp+gz6ajqKujr62j +//! qayksKmmq62lsaiosqqorOyWnaqqtKeqzLGptaurta2rr7Kqtq+ssLOrt6+uuLGusuqhfbWtubCv +//! ubKvs7GwurOwtPSazbevu+ali7SxtbiwvOykjLOyvLWytuCmqOankrSzvbazuLmyvrW0vre0uba1 +//! wLi1ury0wLm2u721wbe3wbq3vMC2vLi4wr+3w7m5w8C4xLi6yry6vsG5xbu7xcC6zMK6xry8xry+ +//! u8O7x729x8C9wb++yMG+wsO+vMK/w8a+y8e/zMnBzcXH18nL2/////////////////////////// +//! //////////////////////////////////////////////////////////////////////////// +//! /////////////////////////////////////////////////////ywAAAAAKAAXAAAI/gBP4Cjh +//! IYMLEh0w4EgBgsMLEyFGFBEB5cOFABgzatS4AVssZAOsLOHCxooVMzCyoNmzaBOkJlS0VEDyZMjG +//! mxk3XOMF60CDBgsoPABK9KcDCRImPCiQYAECAgQCRMU4VSrGCjFarBgUSJCgQ10FBTrkNRCfPnz4 +//! dA3UNa1btnDZqgU7Ntqzu3ej2X2mFy9eaHuhNRtMGJrhwYYN930G2K7eaNIY34U2mfJkwpgzI9Yr +//! GBqwR2KSvAlMOXHnw5pTNzPdLNoWIWtU9XjGjDEYS8LAlFm1SrVvzIKj5TH0KpORSZOryPgCZgqL +//! Ob+jG0YVRBErUrOiiGJ8KxgtYsh27xWL/tswnTtEbsiRVYdJNMHk4yOGhswGjR88UKjQ9Ey+/8TL +//! XKKGGn7Akph/8XX2WDTTcAYfguVt9hhrEPqmzIOJ3VUheb48WJiHG6amC4i+WVJKKCimqGIoYxyj +//! WWK8kKjaJ9bA18sxvXjYhourmbbMMrjI+OIn1QymDCVXANGFK4S1gQw0PxozzC+33FLLKUJq9gk1 +//! gyWDhyNwrMLkYGUEM4wvuLRiCiieXIJJJVlmJskcZ9TZRht1lnFGGmTMkMoonVQSSSOFAGJHHI0w +//! ouiijDaaCCGQRgrpH3q4QYYXWDihxBE+7KCDDjnUIEVAADs= +//! --bzz_bzz__bzz__--"#; +//! +//! let envelope = Envelope::from_bytes(raw_mail.as_bytes(), None).expect("Could not parse mail"); +//! assert_eq!(envelope.subject().as_ref(), "gratuitously encoded subject"); +//! assert_eq!( +//! envelope.message_id_display().as_ref(), +//! "" +//! ); +//! +//! let body = envelope.body_bytes(raw_mail.as_bytes()); +//! assert_eq!(body.content_type().to_string().as_str(), "multipart/mixed"); +//! +//! let body_text = body.text(); +//! assert_eq!(body_text.as_str(), "hello world."); +//! +//! let subattachments: Vec = body.attachments(); +//! assert_eq!(subattachments.len(), 3); +//! assert_eq!( +//! subattachments[2].content_type().name().unwrap(), +//! "test_image.gif" +//! ); +//! ``` pub mod address; pub mod attachment_types; diff --git a/melib/src/email/compose.rs b/melib/src/email/compose.rs index 607c9da31..11a430639 100644 --- a/melib/src/email/compose.rs +++ b/melib/src/email/compose.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! Compose a `Draft`, with MIME and attachment support */ +//! Compose a [``Draft`], with `MIME` and attachment support. use std::{ convert::TryFrom, ffi::OsStr, @@ -43,8 +43,6 @@ use crate::{ pub mod mime; pub mod random; -//use self::mime::*; - use super::parser; #[derive(Debug, PartialEq, Eq, Clone)] diff --git a/melib/src/email/headers.rs b/melib/src/email/headers.rs index e830b88c9..2cf773ec4 100644 --- a/melib/src/email/headers.rs +++ b/melib/src/email/headers.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! Wrapper type `HeaderName` for case-insensitive comparisons */ +//! Wrapper type [`HeaderName`] for case-insensitive comparisons. pub mod names; use std::{ diff --git a/melib/src/email/headers/names.rs b/melib/src/email/headers/names.rs index a79959844..4fc341b03 100644 --- a/melib/src/email/headers/names.rs +++ b/melib/src/email/headers/names.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! E-mail header names. Also referred to as Fields in [RFC5322] */ +//! E-mail header names. Also referred to as `Fields` in `RFC5322`. #![allow(non_upper_case_globals)] use std::{ diff --git a/melib/src/email/list_management.rs b/melib/src/email/list_management.rs index 4bea3d7a9..4727c3075 100644 --- a/melib/src/email/list_management.rs +++ b/melib/src/email/list_management.rs @@ -19,7 +19,8 @@ * along with meli. If not, see . */ -/*! Parsing of rfc2369/rfc2919 `List-*` headers */ +//! Parsing of `RFC2369` and `RFC2919` `List-*` headers. + use std::convert::From; use smallvec::SmallVec; diff --git a/melib/src/email/parser.rs b/melib/src/email/parser.rs index 8a57aa21c..6dd426da9 100644 --- a/melib/src/email/parser.rs +++ b/melib/src/email/parser.rs @@ -327,7 +327,7 @@ pub fn mail(input: &[u8]) -> Result<(Vec<(&[u8], &[u8])>, &[u8])> { } pub mod dates { - /*! Date values in headers */ + //! Date values in headers. use super::{generic::*, *}; use crate::utils::datetime::UnixTimestamp; @@ -634,7 +634,7 @@ pub mod dates { } pub mod generic { - /*! Generally useful parser combinators */ + //! Generally useful parser combinators. use super::*; #[inline(always)] pub fn byte_in_slice<'a>(slice: &'static [u8]) -> impl Fn(&'a [u8]) -> IResult<&'a [u8], u8> { @@ -664,9 +664,9 @@ pub mod generic { } } - ///UTF-8 characters can be defined in terms of octets using the - ///following ABNF [RFC5234], taken from [RFC3629]: - ///UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 + /// UTF-8 characters can be defined in terms of octets using the + /// following ABNF `[RFC5234]`, taken from `[RFC3629]`: + /// UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 fn utf8_non_ascii(input: &[u8]) -> IResult<&[u8], Cow<'_, [u8]>> { /// UTF8-2 = %xC2-DF UTF8-tail fn utf8_2(input: &[u8]) -> IResult<&[u8], &[u8]> { @@ -1414,7 +1414,7 @@ List-Archive: (Web Archive) } pub mod headers { - /*! Email headers */ + //! Email headers. use super::*; pub fn headers(input: &[u8]) -> IResult<&[u8], Vec<(&[u8], &[u8])>> { @@ -1675,7 +1675,7 @@ pub mod headers { } pub mod attachments { - /*! Email attachments */ + //! Email attachments. use super::*; use crate::email::{ address::*, @@ -1945,7 +1945,7 @@ pub mod attachments { } pub mod encodings { - /*! Email encodings (quoted printable, MIME) */ + //! Email encodings (quoted printable, `MIME`). use data_encoding::BASE64_MIME; use encoding::{all::*, DecoderTrap, Encoding}; diff --git a/melib/src/email/pgp.rs b/melib/src/email/pgp.rs index 507f785aa..3e8c2e8c8 100644 --- a/melib/src/email/pgp.rs +++ b/melib/src/email/pgp.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! Verification of OpenPGP signatures */ +//! Verification of OpenPGP signatures. use crate::{ email::{ attachment_types::{ContentType, MultipartType}, @@ -28,9 +28,10 @@ use crate::{ Error, Result, }; -/// Convert raw attachment to the form needed for signature verification ([rfc3156](https://tools.ietf.org/html/rfc3156)) +/// Convert raw attachment to the form needed for signature verification ([RFC3156](https://tools.ietf.org/html/rfc3156)) +/// +/// ## RFC3156 /// -/// ## rfc3156 /// ```text /// Upon receipt of a signed message, an application MUST: /// diff --git a/melib/src/error.rs b/melib/src/error.rs index 1c4e60807..e61e99f2e 100644 --- a/melib/src/error.rs +++ b/melib/src/error.rs @@ -19,9 +19,7 @@ * along with meli. If not, see . */ -/*! - * An error object for `melib` - */ +//! Library error type. use std::{borrow::Cow, fmt, io, result, str, string, sync::Arc}; diff --git a/melib/src/sieve.rs b/melib/src/sieve.rs index 1e34cf71f..c9fa53cd7 100644 --- a/melib/src/sieve.rs +++ b/melib/src/sieve.rs @@ -142,7 +142,7 @@ pub enum ZoneRule { /// "iso8601" => the date and time in restricted ISO 8601 format. Iso8601, /// "std11" => the date and time in a format appropriate - /// for use in a Date: header field [RFC2822]. + /// for use in a Date: header field (`RFC2822`). Std11, /// "zone" => the time zone in use. If the user specified a ///time zone with ":zone", "zone" will diff --git a/melib/src/text_processing/line_break.rs b/melib/src/text_processing/line_break.rs index ff7cb3573..6bbdb2f9e 100644 --- a/melib/src/text_processing/line_break.rs +++ b/melib/src/text_processing/line_break.rs @@ -1270,10 +1270,9 @@ easy to take MORE than nothing.'"#; } mod segment_tree { - /*! Simple segment tree implementation for maximum in range queries. This - * is useful if given an array of numbers you want to get the - * maximum value inside an interval quickly. - */ + //! Simple segment tree implementation for maximum in range queries. This + //! is useful if given an array of numbers you want to get the + //! maximum value inside an interval quickly. use std::{convert::TryFrom, iter::FromIterator}; use smallvec::SmallVec; diff --git a/melib/src/thread.rs b/melib/src/thread.rs index 769e635ec..9ad634eba 100644 --- a/melib/src/thread.rs +++ b/melib/src/thread.rs @@ -19,19 +19,19 @@ * along with meli. If not, see . */ -/*! - * e-mail threading (conversations) - * - * This module implements Jamie Zawinski's [threading algorithm](https://www.jwz.org/doc/threading.html). Quoted comments (/* " .. " */) are - * taken almost verbatim from the algorithm. - * - * The entry point of this module is the `Threads` struct and its `new` - * method. It contains `ThreadNodes` which are the nodes in the thread trees - * that might have messages associated with them. The root nodes (first - * messages in each thread) are stored in `root_set` and `tree` - * vectors. `Threads` has inner mutability since we need to sort without the - * user having mutable ownership. - */ +//! e-mail threading (conversations) +//! +//! This module implements Jamie Zawinski's [threading +//! algorithm](https://www.jwz.org/doc/threading.html). Quoted comments (/* " .. " */) are taken +//! almost verbatim from the algorithm. +//! +//! The entry point of this module is the [`Threads`] struct and its +//! [`new`](Threads::new) method. It contains [`ThreadNode`s](ThreadNode) which +//! are the nodes in the thread trees that might have messages associated with +//! them. The root nodes (first messages in each thread) are stored in +//! [`root_set`](Threads::root_set) and [`thread_nodes`](Threads::thread_nodes) +//! vectors. [`Threads`] has inner mutability since we need to sort without the +//! user having mutable ownership. use crate::{ email::{address::StrBuild, parser::BytesExt, *}, diff --git a/src/command.rs b/src/command.rs index ea58c3f66..e19ccec55 100644 --- a/src/command.rs +++ b/src/command.rs @@ -19,8 +19,9 @@ * along with meli. If not, see . */ -/*! A parser module for user commands passed through Command mode. - */ +//! A parser module for user commands passed through +//! [`Command`](crate::types::UIMode::Command) mode. + pub use melib::thread::{SortField, SortOrder}; use melib::{ nom::{ diff --git a/src/components.rs b/src/components.rs index f0f94b4c5..2f5053be5 100644 --- a/src/components.rs +++ b/src/components.rs @@ -19,14 +19,12 @@ * along with meli. If not, see . */ -/*! Components visual and logical separations of application interfaces. - * - * They can draw on the terminal and receive events, but also do other stuff - * as well. - * For an example, see the [`notifications`] module. - * See also the [`Component`] trait for more details. - */ - +//! Components visual and logical separations of application interfaces. +/// +/// They can draw on the terminal and receive events, but also do other stuff +/// as well. +/// For an example, see the [`notifications`] module. +/// See also the [`Component`] trait for more details. use smallvec::SmallVec; use super::*; diff --git a/src/components/utilities.rs b/src/components/utilities.rs index e96717cc5..cf1bd5163 100644 --- a/src/components/utilities.rs +++ b/src/components/utilities.rs @@ -19,8 +19,7 @@ * along with meli. If not, see . */ -/*! Various useful components that can be used in a generic fashion. - */ +//! Various useful utilities. use melib::{text_processing::Reflow, ShellExpandTrait}; diff --git a/src/components/utilities/tables.rs b/src/components/utilities/tables.rs index b6cdd331e..3d67540bd 100644 --- a/src/components/utilities/tables.rs +++ b/src/components/utilities/tables.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! UI components to display tabular lists. */ +//! UI components to display tabular lists. use std::mem::MaybeUninit; use super::*; diff --git a/src/conf.rs b/src/conf.rs index 1b8d11b22..2e834150d 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -19,7 +19,7 @@ * along with meli. If not, see . */ -/*! Configuration logic and `config.toml` interfaces. */ +//! Configuration logic and `config.toml` interfaces. extern crate serde; extern crate toml; diff --git a/src/conf/accounts.rs b/src/conf/accounts.rs index fce32c00b..8fd7960ef 100644 --- a/src/conf/accounts.rs +++ b/src/conf/accounts.rs @@ -19,9 +19,7 @@ * along with meli. If not, see . */ -/*! - * Account management from user configuration. - */ +//! Account management from user configuration. use std::{ borrow::Cow, diff --git a/src/plugins.rs b/src/plugins.rs index 6fb0b98d9..103df5b00 100644 --- a/src/plugins.rs +++ b/src/plugins.rs @@ -19,8 +19,8 @@ * along with meli. If not, see . */ -/*! Plugins are executed by meli and communication is done by `messagepack` IPC. - */ +//! Plugins are executed by meli and communication is done by `messagepack` IPC. + use melib::error::{Error, Result}; use std::collections::HashMap; use std::io::Write; diff --git a/src/sqlite3.rs b/src/sqlite3.rs index 57215db54..f3bc7f5d3 100644 --- a/src/sqlite3.rs +++ b/src/sqlite3.rs @@ -19,8 +19,7 @@ * along with meli. If not, see . */ -/*! Use an sqlite3 database for fast searching. - */ +//! Use an sqlite3 database for fast searching. use std::{ path::PathBuf, sync::{Arc, RwLock}, diff --git a/src/terminal/cells.rs b/src/terminal/cells.rs index ea3f5cd3f..96569b301 100644 --- a/src/terminal/cells.rs +++ b/src/terminal/cells.rs @@ -19,10 +19,8 @@ * along with meli. If not, see . */ -/*! - Define a (x, y) point in the terminal display as a holder of a character, foreground/background - colors and attributes. -*/ +//! Define a `(x, y)` point in the terminal display as a holder of a character, +//! foreground/background colors and attributes. use std::{ collections::HashMap, diff --git a/src/terminal/position.rs b/src/terminal/position.rs index 6391012b9..1e0206dce 100644 --- a/src/terminal/position.rs +++ b/src/terminal/position.rs @@ -19,11 +19,9 @@ * along with meli. If not, see . */ -/*! -Simple type definitions and macro helper for a (x,y) position on the terminal and the areas they define. - -An `Area` consists of two points: the upper left and bottom right corners. -*/ +//! Simple type definitions and macro helper for a `(x, y)` position on the +//! terminal and the areas they define. An [`Area`] consists of two points: the +//! upper left and bottom right corners. /// A `(x, y)` position on screen. pub type Pos = (usize, usize);