Fix rustdoc::redundant_explicit_links

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/329/head
Manos Pitsidianakis 5 months ago
parent 4026e25428
commit 34a2d52e7e
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -19,6 +19,8 @@
* along with meli. If not, see <http://www.gnu.org/licenses/>. * along with meli. If not, see <http://www.gnu.org/licenses/>.
*/ */
#![deny(rustdoc::redundant_explicit_links)]
//! //!
//! This crate contains the frontend stuff of the application. The application //! This crate contains the frontend stuff of the application. The application
//! entry way on `src/bin.rs` creates an event loop and passes input to a //! entry way on `src/bin.rs` creates an event loop and passes input to a

@ -125,8 +125,8 @@ macro_rules! row_attr {
}}; }};
} }
/// A list of all mail ([`Envelope`](melib::Envelope)s) in a `Mailbox`. On `\n` /// A list of all mail ([`Envelope`]s) in a `Mailbox`. On `\n`
/// it opens the [`Envelope`](melib::Envelope) content in a [`MailView`]. /// it opens the [`Envelope`] content in a [`MailView`].
#[derive(Debug)] #[derive(Debug)]
pub struct ThreadListing { pub struct ThreadListing {
/// (x, y, z): x is accounts, y is mailboxes, z is index inside a mailbox. /// (x, y, z): x is accounts, y is mailboxes, z is index inside a mailbox.

@ -43,6 +43,20 @@ pub use screen::{Area, Screen, ScreenGeneration, StateStdout, Tty, Virtual};
pub use self::{cells::*, keys::*, position::*, text_editing::*}; pub use self::{cells::*, keys::*, position::*, text_editing::*};
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Alignment {
/// Stretch to fill all space if possible, center if no meaningful way to
/// stretch.
Fill,
/// Snap to left or top side, leaving space on right or bottom.
Start,
/// Snap to right or bottom side, leaving space on left or top.
End,
/// Center natural width of widget inside the allocation.
#[default]
Center,
}
/* /*
* CSI events we use * CSI events we use
*/ */

@ -30,14 +30,13 @@
//! * a struct containing the PID of the child process that talks to this //! * a struct containing the PID of the child process that talks to this
//! pseudoterminal. //! pseudoterminal.
//! * a [`std::fs::File`] handle to the child process's standard input stream. //! * a [`std::fs::File`] handle to the child process's standard input stream.
//! * an [`EmbeddedGrid`] which is a wrapper over //! * an [`EmbeddedGrid`] which is a wrapper over [`CellBuffer`] along with
//! [`CellBuffer`](crate::CellBuffer) along with the properties needed to //! the properties needed to maintain a proper state machine that keeps
//! maintain a proper state machine that keeps track of ongoing escape code //! track of ongoing escape code operations.
//! operations.
//! //!
//! ## Creation //! ## Creation
//! //!
//! To create a [`Terminal`], see [`create_pty`](super::create_pty). //! To create a [`Terminal`], see [`create_pty`].
use melib::{ use melib::{
error::{Error, Result}, error::{Error, Result},

@ -20,8 +20,7 @@
*/ */
//! Simple type definitions and macro helper for a `(x, y)` position on the //! 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 //! terminal and the areas they define.
//! upper left and bottom right corners.
/// A `(x, y)` position on screen. /// A `(x, y)` position on screen.
pub type Pos = (usize, usize); pub type Pos = (usize, usize);
@ -51,17 +50,3 @@ pub fn pos_inc(p: Pos, inc: (usize, usize)) -> Pos {
pub fn pos_dec(p: Pos, dec: (usize, usize)) -> Pos { pub fn pos_dec(p: Pos, dec: (usize, usize)) -> Pos {
(p.0.saturating_sub(dec.0), p.1.saturating_sub(dec.1)) (p.0.saturating_sub(dec.0), p.1.saturating_sub(dec.1))
} }
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum Alignment {
/// Stretch to fill all space if possible, center if no meaningful way to
/// stretch.
Fill,
/// Snap to left or top side, leaving space on right or bottom.
Start,
/// Snap to right or bottom side, leaving space on left or top.
End,
/// Center natural width of widget inside the allocation.
#[default]
Center,
}

@ -27,7 +27,7 @@ use termion::{clear, cursor, raw::IntoRawMode, screen::AlternateScreen};
use crate::{ use crate::{
terminal::{ terminal::{
cells::CellBuffer, position::*, BracketModeEnd, BracketModeStart, Cell, Color, cells::CellBuffer, position::*, Alignment, BracketModeEnd, BracketModeStart, Cell, Color,
DisableMouse, DisableSGRMouse, EnableMouse, EnableSGRMouse, DisableMouse, DisableSGRMouse, EnableMouse, EnableSGRMouse,
RestoreWindowTitleIconFromStack, SaveWindowTitleIconToStack, RestoreWindowTitleIconFromStack, SaveWindowTitleIconToStack,
}, },

@ -31,7 +31,7 @@
//! `vi`. //! `vi`.
//! //!
//! [`UIEvent`] is the type passed around //! [`UIEvent`] is the type passed around
//! [`Component`](crate::components::Component)'s when something happens. //! [`Component`]'s when something happens.
#[macro_use] #[macro_use]
mod helpers; mod helpers;

@ -23,9 +23,9 @@
//! //!
//! # Parsing bytes into an `Envelope` //! # Parsing bytes into an `Envelope`
//! //!
//! An [`Envelope`](Envelope) represents the information you can get from an //! An [`Envelope`] represents the information you can get from an email's
//! email's headers and body structure. Addresses in `To`, `From` fields etc //! headers and body structure. Addresses in `To`, `From` fields etc are parsed
//! are parsed into [`Address`](crate::email::Address) types. //! into [`Address`] types.
//! //!
//! ``` //! ```
//! use melib::{Attachment, Envelope}; //! use melib::{Attachment, Envelope};

@ -1606,8 +1606,7 @@ pub mod headers {
)) ))
} }
/// Parse a single header as a ([`HeaderName`](crate::email::HeaderName), /// Parse a single header as a ([`HeaderName`], [`&[u8]`]) tuple.
/// [`&[u8]`]) tuple.
pub fn header_with_val(input: &[u8]) -> IResult<&[u8], (HeaderName, &[u8])> { pub fn header_with_val(input: &[u8]) -> IResult<&[u8], (HeaderName, &[u8])> {
if input.is_empty() { if input.is_empty() {
return Err(nom::Err::Error( return Err(nom::Err::Error(

@ -20,6 +20,7 @@
*/ */
#![deny( #![deny(
rustdoc::redundant_explicit_links,
/* groups */ /* groups */
clippy::correctness, clippy::correctness,
clippy::suspicious, clippy::suspicious,

Loading…
Cancel
Save