clippy: Put doc text type names and co. in backtics

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/384/head
Manos Pitsidianakis 2 months ago
parent 3a5306e9dd
commit 36b7c00b97
No known key found for this signature in database
GPG Key ID: 7729C7707F7E09D0

@ -50,8 +50,8 @@ pub enum SubCommand {
/// edit configuration files with `$EDITOR`/`$VISUAL`. /// edit configuration files with `$EDITOR`/`$VISUAL`.
EditConfig, EditConfig,
/// create a sample configuration file with available configuration options. /// create a sample configuration file with available configuration options.
/// If PATH is not specified, meli will try to create it in /// If `PATH` is not specified, meli will try to create it in
/// $XDG_CONFIG_HOME/meli/config.toml /// `$XDG_CONFIG_HOME/meli/config.toml`
#[structopt(display_order = 1)] #[structopt(display_order = 1)]
CreateConfig { CreateConfig {
#[structopt(value_name = "NEW_CONFIG_PATH", parse(from_os_str))] #[structopt(value_name = "NEW_CONFIG_PATH", parse(from_os_str))]
@ -69,8 +69,8 @@ pub enum SubCommand {
Man(ManOpt), Man(ManOpt),
#[structopt(display_order = 4)] #[structopt(display_order = 4)]
/// Install manual pages to the first location provided by $MANPATH / /// Install manual pages to the first location provided by `$MANPATH` /
/// manpath(1), unless you specify the directory as an argument. /// `manpath(1)`, unless you specify the directory as an argument.
InstallMan { InstallMan {
#[structopt(value_name = "DESTINATION_PATH", parse(from_os_str))] #[structopt(value_name = "DESTINATION_PATH", parse(from_os_str))]
destination_path: Option<PathBuf>, destination_path: Option<PathBuf>,
@ -93,7 +93,7 @@ pub struct ManOpt {
#[cfg_attr(feature = "cli-docs", structopt(default_value = "meli", possible_values=manpages::POSSIBLE_VALUES, value_name="PAGE", parse(try_from_str = manpages::parse_manpage)))] #[cfg_attr(feature = "cli-docs", structopt(default_value = "meli", possible_values=manpages::POSSIBLE_VALUES, value_name="PAGE", parse(try_from_str = manpages::parse_manpage)))]
/// Name of manual page. /// Name of manual page.
pub page: manpages::ManPages, pub page: manpages::ManPages,
/// If true, output text in stdout instead of spawning $PAGER. /// If true, output text in stdout instead of spawning `$PAGER`.
#[cfg(feature = "cli-docs")] #[cfg(feature = "cli-docs")]
#[cfg_attr( #[cfg_attr(
feature = "cli-docs", feature = "cli-docs",

@ -120,11 +120,11 @@ pub enum MouseButton {
Middle, Middle,
/// Mouse wheel is going up. /// Mouse wheel is going up.
/// ///
/// This event is typically only used with Mouse::Press. /// This event is typically only used with [`MouseEvent::Press`].
WheelUp, WheelUp,
/// Mouse wheel is going down. /// Mouse wheel is going down.
/// ///
/// This event is typically only used with Mouse::Press. /// This event is typically only used with [`MouseEvent::Press`].
WheelDown, WheelDown,
} }

@ -273,7 +273,7 @@ impl From<Error> for BackendEvent {
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum RefreshEventKind { pub enum RefreshEventKind {
Update(EnvelopeHash, Box<Envelope>), Update(EnvelopeHash, Box<Envelope>),
/// Rename(old_hash, new_hash) /// `Rename(old_hash, new_hash)`
Rename(EnvelopeHash, EnvelopeHash), Rename(EnvelopeHash, EnvelopeHash),
Create(Box<Envelope>), Create(Box<Envelope>),
Remove(EnvelopeHash), Remove(EnvelopeHash),

@ -55,7 +55,7 @@ pub enum NetworkErrorKind {
RequestBodyNotRewindable, RequestBodyNotRewindable,
/// Connection (not request) timeout. /// Connection (not request) timeout.
Timeout, Timeout,
/// TooManyRedirects /// Too many redirects
TooManyRedirects, TooManyRedirects,
/// Invalid TLS connection /// Invalid TLS connection
InvalidTLSConnection, InvalidTLSConnection,

@ -237,7 +237,7 @@ impl JmapConnection {
.set(Some(req_instant), Ok(session)) .set(Some(req_instant), Ok(session))
.await; .await;
/* Fetch account identities. */ // Fetch account identities.
let mut id_list = { let mut id_list = {
let mut req = Request::new(self.request_no.clone()); let mut req = Request::new(self.request_no.clone());

@ -48,7 +48,7 @@ pub struct EmailImport {
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]
pub if_in_state: Option<State<EmailObject>>, pub if_in_state: Option<State<EmailObject>>,
/// o emails: `Id[EmailImport]` /// o emails: `Id[EmailImport]`
/// A map of creation id (client specified) to EmailImport objects. /// A map of creation id (client specified) to [`EmailImport`] objects.
pub emails: IndexMap<Id<EmailObject>, EmailImportObject>, pub emails: IndexMap<Id<EmailObject>, EmailImportObject>,
} }
@ -131,11 +131,11 @@ pub enum EmailImportError {
/// `RFC5322`, or even just with the same Message-ID `RFC5322`, to /// `RFC5322`, or even just with the same Message-ID `RFC5322`, to
/// coexist within an account. In this case, it MUST reject attempts to /// coexist within an account. In this case, it MUST reject attempts to
/// import an Email considered to be a duplicate with an `alreadyExists` /// import an Email considered to be a duplicate with an `alreadyExists`
/// SetError. /// [`SetError`].
AlreadyExists { AlreadyExists {
description: Option<String>, description: Option<String>,
/// An `existingId` property of type `Id` MUST be included on /// An `existingId` property of type `Id` MUST be included on
/// the SetError object with the id of the existing Email. If /// the [`SetError`] object with the id of the existing Email. If
/// duplicates are allowed, the newly created Email object MUST /// duplicates are allowed, the newly created Email object MUST
/// have a separate id and independent mutable properties to the /// have a separate id and independent mutable properties to the
/// existing object. /// existing object.
@ -143,21 +143,21 @@ pub enum EmailImportError {
}, },
/// If the `blobId`, `mailboxIds`, or `keywords` properties are invalid /// If the `blobId`, `mailboxIds`, or `keywords` properties are invalid
/// (e.g., missing, wrong type, id not found), the server MUST reject the /// (e.g., missing, wrong type, id not found), the server MUST reject the
/// import with an `invalidProperties` SetError. /// import with an `invalidProperties` [`SetError`].
InvalidProperties { InvalidProperties {
description: Option<String>, description: Option<String>,
properties: Vec<String>, properties: Vec<String>,
}, },
/// If the Email cannot be imported because it would take the account /// If the Email cannot be imported because it would take the account
/// over quota, the import should be rejected with an `overQuota` /// over quota, the import should be rejected with an `overQuota`
/// SetError. /// [`SetError`].
OverQuota { description: Option<String> }, OverQuota { description: Option<String> },
/// If the blob referenced is not a valid message `RFC5322`, the server /// If the blob referenced is not a valid message `RFC5322`, the server
/// MAY modify the message to fix errors (such as removing NUL octets or /// MAY modify the message to fix errors (such as removing NUL octets or
/// fixing invalid headers). If it does this, the `blobId` on the /// fixing invalid headers). If it does this, the `blobId` on the
/// response MUST represent the new representation and therefore be /// response MUST represent the new representation and therefore be
/// different to the `blobId` on the EmailImport object. Alternatively, /// different to the `blobId` on the [`EmailImport`] object. Alternatively,
/// the server MAY reject the import with an `invalidEmail` SetError. /// the server MAY reject the import with an `invalidEmail` [`SetError`].
InvalidEmail { description: Option<String> }, InvalidEmail { description: Option<String> },
/// An `ifInState` argument was supplied, and it does not match the current /// An `ifInState` argument was supplied, and it does not match the current
/// state. /// state.
@ -189,7 +189,7 @@ pub struct EmailImportResponse {
pub created: Option<IndexMap<Id<EmailObject>, EmailImportResult>>, pub created: Option<IndexMap<Id<EmailObject>, EmailImportResult>>,
/// o notCreated: `Id[SetError]|null` /// o notCreated: `Id[SetError]|null`
/// A map of the creation id to a SetError object for each Email that /// A map of the creation id to a [`SetError`] object for each Email that
/// failed to be created, or null if all successful. The possible /// failed to be created, or null if all successful. The possible
/// errors are defined above. /// errors are defined above.
pub not_created: Option<IndexMap<Id<EmailObject>, EmailImportError>>, pub not_created: Option<IndexMap<Id<EmailObject>, EmailImportError>>,

@ -33,52 +33,52 @@ pub struct IdentityObject {
pub id: Id<IdentityObject>, pub id: Id<IdentityObject>,
/// name: `String` (default: "") /// name: `String` (default: "")
/// The "From" name the client SHOULD use when creating a new Email /// The "From" name the client SHOULD use when creating a new
/// from this Identity. /// [`Email`](EmailObject) from this Identity.
#[serde(default)] #[serde(default)]
pub name: String, pub name: String,
/// email: `String` (immutable) /// email: `String` (immutable)
/// The "From" email address the client MUST use when creating a new /// The "From" email address the client MUST use when creating a new
/// Email from this Identity. If the "mailbox" part of the address /// [`Email`](EmailObject) from this Identity. If the "mailbox" part of the
/// (the section before the "@") is the single character "*" (e.g., /// address (the section before the "@") is the single character "*"
/// "*@example.com"), the client may use any valid address ending in /// (e.g., "*@example.com"), the client may use any valid address ending
/// that domain (e.g., "[email protected]"). /// in that domain (e.g., "[email protected]").
pub email: String, pub email: String,
/// replyTo: `EmailAddress[]|null` (default: null) /// replyTo: `EmailAddress[]|null` (default: null)
/// The Reply-To value the client SHOULD set when creating a new Email /// The Reply-To value the client SHOULD set when creating a new
/// from this Identity. /// [`Email`](EmailObject) from this Identity.
#[serde(default)] #[serde(default)]
pub reply_to: Option<Vec<EmailAddress>>, pub reply_to: Option<Vec<EmailAddress>>,
/// bcc: `EmailAddress[]|null` (default: null) /// bcc: `EmailAddress[]|null` (default: null)
/// The Bcc value the client SHOULD set when creating a new Email from /// The Bcc value the client SHOULD set when creating a new
/// this Identity. /// [`Email`](EmailObject) from this Identity.
#[serde(default)] #[serde(default)]
pub bcc: Option<Vec<EmailAddress>>, pub bcc: Option<Vec<EmailAddress>>,
/// textSignature: `String` (default: "") /// textSignature: `String` (default: "")
/// A signature the client SHOULD insert into new plaintext messages /// A signature the client SHOULD insert into new plaintext messages
// that will be sent from this Identity. Clients MAY ignore this /// that will be sent from this Identity. Clients MAY ignore this
// and/or combine this with a client-specific signature preference. /// and/or combine this with a client-specific signature preference.
#[serde(default)] #[serde(default)]
pub text_signature: String, pub text_signature: String,
/// htmlSignature: `String` (default: "") /// htmlSignature: `String` (default: "")
/// A signature the client SHOULD insert into new HTML messages that /// A signature the client SHOULD insert into new HTML messages that
/// will be sent from this Identity. This text MUST be an HTML /// will be sent from this Identity. This text MUST be an HTML
/// snippet to be inserted into the "<body></body>" section of the /// snippet to be inserted into the `<body></body>` section of the
/// HTML. Clients MAY ignore this and/or combine this with a client- /// HTML. Clients MAY ignore this and/or combine this with a client-
/// specific signature preference. /// specific signature preference.
#[serde(default)] #[serde(default)]
pub html_signature: String, pub html_signature: String,
/// mayDelete: `Boolean` (server-set) /// mayDelete: `Boolean` (server-set)
/// Is the user allowed to delete this Identity? Servers may wish to /// Is the user allowed to delete this Identity? Servers may wish to
/// set this to false for the user's username or other default /// set this to `false` for the user's username or other default
/// address. Attempts to destroy an Identity with "mayDelete: false" /// address. Attempts to destroy an Identity with "mayDelete: false"
/// will be rejected with a standard "forbidden" SetError. /// will be rejected with a standard "forbidden" [`SetError`].
#[serde(skip_serializing)] #[serde(skip_serializing)]
pub may_delete: bool, pub may_delete: bool,
} }
@ -102,7 +102,7 @@ impl Method<IdentityObject> for IdentityChanges {
/// ///
/// ```text /// ```text
/// This is a standard "/set" method as described in [RFC8620], /// This is a standard "/set" method as described in [RFC8620],
/// Section 5.3. The following extra SetError types are defined: /// Section 5.3. The following extra [`SetError`] types are defined:
/// For "create": /// For "create":
/// o "forbiddenFrom": The user is not allowed to send from the address /// o "forbiddenFrom": The user is not allowed to send from the address
/// given as the "email" property of the Identity. /// given as the "email" property of the Identity.

@ -103,11 +103,13 @@ impl Method<MailboxObject> for MailboxGet {
/// ///
/// For `destroy`: /// For `destroy`:
/// ///
/// - `mailboxHasChild`: The Mailbox still has at least one child Mailbox. The /// - `mailboxHasChild`: The [`Mailbox`](MailboxObject) still has at least one
/// client MUST remove these before it can delete the parent Mailbox. /// child [`Mailbox`](MailboxObject). The client MUST remove these before it
/// can delete the parent [`Mailbox`](MailboxObject).
/// ///
/// - `mailboxHasEmail`: The Mailbox has at least one Email assigned to it, and /// - `mailboxHasEmail`: The [`Mailbox`](MailboxObject) has at least one
/// the `onDestroyRemoveEmails` argument was false. /// [`Email`](EmailObject) assigned to it, and the `onDestroyRemoveEmails`
/// argument was false.
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct MailboxSet { pub struct MailboxSet {
@ -115,11 +117,13 @@ pub struct MailboxSet {
pub set_call: Set<MailboxObject>, pub set_call: Set<MailboxObject>,
/// onDestroyRemoveEmails: `Boolean` (default: false) /// onDestroyRemoveEmails: `Boolean` (default: false)
/// ///
/// If false, any attempt to destroy a Mailbox that still has Emails /// If false, any attempt to destroy a [`Mailbox`](MailboxObject) that still
/// in it will be rejected with a `mailboxHasEmail` SetError. If /// has [`Email`s](EmailObject) in it will be rejected with a
/// true, any Emails that were in the Mailbox will be removed from it, /// `mailboxHasEmail` [`SetError`]. If
/// and if in no other Mailboxes, they will be destroyed when the /// true, any [`Email`s](EmailObject) that were in the
/// Mailbox is destroyed. /// [`Mailbox`](MailboxObject) will be removed from it, and if in no
/// other [`Mailbox`es](MailboxObject), they will be destroyed when the
/// [`Mailbox`](MailboxObject) is destroyed.
#[serde(default)] #[serde(default)]
pub on_destroy_remove_emails: bool, pub on_destroy_remove_emails: bool,
} }

@ -293,9 +293,9 @@ pub struct EmailSubmissionSet {
/// A map of [`EmailSubmissionObject`] id to an object containing properties /// A map of [`EmailSubmissionObject`] id to an object containing properties
/// to update on the [`Email`](EmailObject) object referenced by the /// to update on the [`Email`](EmailObject) object referenced by the
/// [`EmailSubmissionObject`] if the create/update/destroy succeeds. (For /// [`EmailSubmissionObject`] if the create/update/destroy succeeds. (For
/// references to EmailSubmissions created in the same /// references to [`EmailSubmissions`](EmailSubmissionObject) created in the
/// `/set` invocation, this is equivalent to a creation-reference, so the id /// same `/set` invocation, this is equivalent to a creation-reference,
/// will be the creation id prefixed with a `#`.) /// so the id will be the creation id prefixed with a `#`.)
#[serde(default)] #[serde(default)]
pub on_success_update_email: Option<IndexMap<Id<EmailSubmissionObject>, PatchObject>>, pub on_success_update_email: Option<IndexMap<Id<EmailSubmissionObject>, PatchObject>>,
/// onSuccessDestroyEmail: `Id[]|null` /// onSuccessDestroyEmail: `Id[]|null`

@ -726,7 +726,7 @@ where
/// A map of an id to a Patch object to apply to the current Foo /// A map of an id to a Patch object to apply to the current Foo
/// object with that id, or null if no objects are to be updated. /// object with that id, or null if no objects are to be updated.
/// ///
/// A *PatchObject* is of type `String[*]` and represents an unordered /// A [`PatchObject`] is of type `String[*]` and represents an unordered
/// set of patches. The keys are a path in JSON Pointer format /// set of patches. The keys are a path in JSON Pointer format
/// `RFC6901`, with an implicit leading `/` (i.e., prefix each key /// `RFC6901`, with an implicit leading `/` (i.e., prefix each key
/// with `/` before applying the JSON Pointer evaluation algorithm). /// with `/` before applying the JSON Pointer evaluation algorithm).
@ -741,8 +741,8 @@ where
/// * All parts prior to the last (i.e., the value after the final slash) /// * All parts prior to the last (i.e., the value after the final slash)
/// MUST already exist on the object being patched. /// MUST already exist on the object being patched.
/// ///
/// * There MUST NOT be two patches in the PatchObject where the pointer /// * There MUST NOT be two patches in the [`PatchObject`] where the
/// of one is the prefix of the pointer of the other, e.g., /// pointer of one is the prefix of the pointer of the other, e.g.,
/// `alerts/1/offset` and `alerts`. /// `alerts/1/offset` and `alerts`.
/// ///
/// The value associated with each pointer determines how to apply /// The value associated with each pointer determines how to apply
@ -758,10 +758,10 @@ where
/// Any server-set properties MAY be included in the patch if their /// Any server-set properties MAY be included in the patch if their
/// value is identical to the current server value (before applying /// value is identical to the current server value (before applying
/// the patches to the object). Otherwise, the update MUST be /// the patches to the object). Otherwise, the update MUST be
/// rejected with an `invalidProperties` SetError. /// rejected with an `invalidProperties` [`SetError`].
/// ///
/// This patch definition is designed such that an entire Foo object /// This patch definition is designed such that an entire Foo object
/// is also a valid PatchObject. The client may choose to optimise /// is also a valid [`PatchObject`]. The client may choose to optimise
/// network usage by just sending the diff or may send the whole /// network usage by just sending the diff or may send the whole
/// object; the server processes it the same either way. /// object; the server processes it the same either way.
pub update: Option<IndexMap<Argument<Id<OBJ>>, PatchObject>>, pub update: Option<IndexMap<Argument<Id<OBJ>>, PatchObject>>,
@ -876,7 +876,7 @@ pub struct SetResponse<OBJ: Object> {
/// successfully updated. /// successfully updated.
/// ///
/// The value for each id is a Foo object containing any property that /// The value for each id is a Foo object containing any property that
/// changed in a way *not* explicitly requested by the PatchObject /// changed in a way *not* explicitly requested by the [`PatchObject`]
/// sent to the server, or null if none. This lets the client know of /// sent to the server, or null if none. This lets the client know of
/// any changes to server-set or computed properties. /// any changes to server-set or computed properties.
/// ///
@ -889,17 +889,17 @@ pub struct SetResponse<OBJ: Object> {
pub destroyed: Option<Vec<Id<OBJ>>>, pub destroyed: Option<Vec<Id<OBJ>>>,
/// o notCreated: `Id[SetError]|null` /// o notCreated: `Id[SetError]|null`
/// ///
/// A map of the creation id to a SetError object for each record that /// A map of the creation id to a [`SetError`] object for each record that
/// failed to be created, or null if all successful. /// failed to be created, or null if all successful.
pub not_created: Option<Vec<SetError>>, pub not_created: Option<Vec<SetError>>,
/// o notUpdated: `Id[SetError]|null` /// o notUpdated: `Id[SetError]|null`
/// ///
/// A map of the Foo id to a SetError object for each record that /// A map of the Foo id to a [`SetError`] object for each record that
/// failed to be updated, or null if all successful. /// failed to be updated, or null if all successful.
pub not_updated: Option<Vec<SetError>>, pub not_updated: Option<Vec<SetError>>,
/// o notDestroyed: `Id[SetError]|null` /// o notDestroyed: `Id[SetError]|null`
/// ///
/// A map of the Foo id to a SetError object for each record that /// A map of the Foo id to a [`SetError`] object for each record that
/// failed to be destroyed, or null if all successful.// /// failed to be destroyed, or null if all successful.//
pub not_destroyed: Option<Vec<SetError>>, pub not_destroyed: Option<Vec<SetError>>,
} }
@ -938,8 +938,8 @@ pub enum SetError {
/// (update; destroy). The id given to update/destroy cannot be found. /// (update; destroy). The id given to update/destroy cannot be found.
NotFound(Option<String>), NotFound(Option<String>),
/// (update). The PatchObject given to update the record was not a valid /// (update). The [`PatchObject`] given to update the record was not a
/// patch (see the patch description). /// valid patch (see the patch description).
InvalidPatch(Option<String>), InvalidPatch(Option<String>),
/// (update). The client requested that an object be both updated and /// (update). The client requested that an object be both updated and
@ -1254,7 +1254,7 @@ pub struct QueryChangesResponse<OBJ: Object> {
/// The array MUST be sorted in order of index, with the lowest index /// The array MUST be sorted in order of index, with the lowest index
/// first. /// first.
/// An *AddedItem* object has the following properties: /// An [`AddedItem`] object has the following properties:
/// * id: `Id` /// * id: `Id`

Loading…
Cancel
Save