meli: Add clippy::doc_markdown

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/359/head
Manos Pitsidianakis 3 months ago
parent 9af284b8db
commit 30a3205e4f
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -56,7 +56,7 @@ pub(crate) fn override_derive(filenames: &[(&str, &str)]) {
#![allow(clippy::derivable_impls)] #![allow(clippy::derivable_impls)]
//! This module is automatically generated by config_macros.rs. //! This module is automatically generated by `config_macros.rs`.
use super::*; use super::*;
use melib::HeaderName; use melib::HeaderName;

@ -63,7 +63,7 @@ pub use crate::actions::{
ViewAction::{self, *}, ViewAction::{self, *},
}; };
/// Helper macro to convert an array of tokens into a TokenStream /// Helper macro to convert an array of tokens into a `TokenStream`
macro_rules! to_stream { macro_rules! to_stream {
($token: expr) => { ($token: expr) => {
TokenStream { TokenStream {

@ -22,7 +22,7 @@
#![allow(clippy::derivable_impls)] #![allow(clippy::derivable_impls)]
//! This module is automatically generated by config_macros.rs. //! This module is automatically generated by `config_macros.rs`.
use super::*; use super::*;
use melib::HeaderName; use melib::HeaderName;

@ -361,17 +361,17 @@ pub enum ColorField {
Bg, Bg,
} }
/// The field a ThemeValue::Link refers to. /// The field a `ThemeValue::Link` refers to.
trait ThemeLink { trait ThemeLink {
type LinkType; type LinkType;
} }
/// A color value that's a link can either refer to .fg or .bg field /// A color value that's a link can either refer to `.fg` or `.bg` field
impl ThemeLink for Color { impl ThemeLink for Color {
type LinkType = ColorField; type LinkType = ColorField;
} }
/// An attr value that's a link can only refer to an .attr field /// An `attr` value that's a link can only refer to an `.attr` field
impl ThemeLink for Attr { impl ThemeLink for Attr {
type LinkType = (); type LinkType = ();
} }

@ -417,7 +417,7 @@ impl JobExecutor {
pub type JobChannel<T> = oneshot::Receiver<T>; pub type JobChannel<T> = oneshot::Receiver<T>;
/// JoinHandle for the future that allows us to cancel the task. /// `JoinHandle` for the future that allows us to cancel the task.
#[derive(Debug)] #[derive(Debug)]
pub struct JoinHandle<T> { pub struct JoinHandle<T> {
pub task: Arc<Mutex<Option<async_task::Task<()>>>>, pub task: Arc<Mutex<Option<async_task::Task<()>>>>,

@ -40,6 +40,8 @@
//clippy::cast_lossless, //clippy::cast_lossless,
//clippy::cast_possible_wrap, //clippy::cast_possible_wrap,
//clippy::ptr_as_ptr, //clippy::ptr_as_ptr,
clippy::doc_markdown,
clippy::expect_fun_call,
clippy::bool_to_int_with_if, clippy::bool_to_int_with_if,
clippy::borrow_as_ptr, clippy::borrow_as_ptr,
clippy::cast_ptr_alignment, clippy::cast_ptr_alignment,

@ -32,7 +32,7 @@ use crate::components::PageMovement;
#[derive(Debug)] #[derive(Debug)]
struct ThreadEntry { struct ThreadEntry {
index: (usize, ThreadNodeHash, usize), index: (usize, ThreadNodeHash, usize),
/// (indentation, thread_node index, line number in listing) /// (indentation, `thread_node` index, line number in listing)
indentation: usize, indentation: usize,
msg_hash: EnvelopeHash, msg_hash: EnvelopeHash,
seen: bool, seen: bool,
@ -73,11 +73,11 @@ pub struct ThreadView {
} }
impl ThreadView { impl ThreadView {
/// @coordinates: (account index, mailbox_hash, root set thread_node index) /// @`coordinates`: (account index, `mailbox_hash`, root set `thread_node`
/// @expanded_hash: optional position of expanded entry when we render the /// index)
/// ThreadView. /// @`expanded_hash`: optional position of expanded entry when we
/// default: expanded message is the last one. /// render the `ThreadView`.
/// @context: current context /// default: expanded message is the last one.
pub fn new( pub fn new(
coordinates: (AccountHash, MailboxHash, EnvelopeHash), coordinates: (AccountHash, MailboxHash, EnvelopeHash),
thread_group: ThreadHash, thread_group: ThreadHash,

@ -76,7 +76,7 @@ impl File {
inner(&self.path).chain_err_summary(|| format!("Can't read {}", self.path.display())) inner(&self.path).chain_err_summary(|| format!("Can't read {}", self.path.display()))
} }
/// Returned `File` will be deleted when dropped if delete_on_drop is set, /// Returned `File` will be deleted when dropped if `delete_on_drop` is set,
/// so make sure to add it on `context.temp_files` to reap it later. /// so make sure to add it on `context.temp_files` to reap it later.
pub fn create_temp_file( pub fn create_temp_file(
bytes: &[u8], bytes: &[u8],

@ -38,11 +38,11 @@ enum SelectorCursor {
/// Shows a little window with options for user to select. /// Shows a little window with options for user to select.
/// ///
/// Instantiate with Selector::new(). Set single_only to true if user should /// Instantiate with `Selector::new()`. Set `single_only` to true if user should
/// only choose one of the options. After passing input events to this /// only choose one of the options. After passing input events to this
/// component, check Selector::is_done to see if the user has finalised their /// component, check `Selector::is_done` to see if the user has finalised their
/// choices. Collect the choices by consuming the Selector with /// choices. Collect the choices by consuming the `Selector` with
/// Selector::collect() /// `Selector::collect()`
pub struct Selector< pub struct Selector<
T: 'static + PartialEq + std::fmt::Debug + Clone + Sync + Send, T: 'static + PartialEq + std::fmt::Debug + Clone + Sync + Send,
F: 'static + Sync + Send, F: 'static + Sync + Send,
@ -58,7 +58,7 @@ pub struct Selector<
horizontal_alignment: Alignment, horizontal_alignment: Alignment,
title: String, title: String,
/// If true, user has finished their selection /// If `true`, user has finished their selection
done: bool, done: bool,
done_fn: F, done_fn: F,
dirty: bool, dirty: bool,

Loading…
Cancel
Save