Skip to content

Commit

Permalink
Refactor code-style for clipp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 20, 2023
1 parent 8ea1401 commit 07ec266
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/construct/autolink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
//! ```
//!
//! The maximum allowed size of a scheme is `31` (inclusive), which is defined
//! in [`AUTOLINK_SCHEME_SIZE_MAX`][autolink_scheme_size_max].
//! in [`AUTOLINK_SCHEME_SIZE_MAX`][].
//! The maximum allowed size of a domain is `63` (inclusive), which is defined
//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][autolink_domain_size_max].
//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][].
//!
//! The grammar for autolinks is quite strict and prohibits the use of ASCII control
//! characters or spaces.
Expand Down
2 changes: 1 addition & 1 deletion src/construct/gfm_footnote_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//!
//! Definitions match to calls through identifiers.
//! To match, both labels must be equal after normalizing with
//! [`normalize_identifier`][normalize_identifier].
//! [`normalize_identifier`][].
//! One definition can match to multiple calls.
//! Multiple definitions with the same, normalized, identifier are ignored: the
//! first definition is preferred.
Expand Down
4 changes: 2 additions & 2 deletions src/construct/html_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
//! typically kick-in instead.
//!
//! The list of tag names allowed in the **raw** production are defined in
//! [`HTML_RAW_NAMES`][html_raw_names].
//! [`HTML_RAW_NAMES`][].
//! This production exists because there are a few cases where markdown
//! *inside* some elements, and hence interleaving, does not make sense.
//!
//! The list of tag names allowed in the **basic** production are defined in
//! [`HTML_BLOCK_NAMES`][html_block_names].
//! [`HTML_BLOCK_NAMES`][].
//! This production exists because there are a few cases where we can decide
//! early that something is going to be a flow (block) element instead of a
//! phrasing (inline) element.
Expand Down
2 changes: 1 addition & 1 deletion src/construct/label_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//! interpreting the text provided between the first, implicit, label (`x`).
//! To match, the effective label of the reference must be equal to the label
//! of the definition after normalizing with
//! [`normalize_identifier`][normalize_identifier].
//! [`normalize_identifier`][].
//!
//! Importantly, while the label of a full reference *can* include [string][]
//! content, and in case of collapsed and shortcut references even [text][]
Expand Down
2 changes: 1 addition & 1 deletion src/construct/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//!
//! The following constructs are found in markdown (`CommonMark`):
//!
//! * [attention][attention] (strong, emphasis, extension: GFM strikethrough)
//! * [attention][] (strong, emphasis, extension: GFM strikethrough)
//! * [autolink][]
//! * [blank line][blank_line]
//! * [block quote][block_quote]
Expand Down
2 changes: 1 addition & 1 deletion src/construct/partial_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
//! The maximum allowed size of the label, without the brackets, is `999`
//! (inclusive), which is defined in
//! [`LINK_REFERENCE_SIZE_MAX`][link_reference_size_max].
//! [`LINK_REFERENCE_SIZE_MAX`][].
//!
//! Labels can contain line endings and whitespace, but they are not allowed to
//! contain blank lines, and they must not be blank themselves.
Expand Down
2 changes: 1 addition & 1 deletion src/construct/partial_whitespace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! consistents solely of spaces, at least 2, forms a hard break (trailing).
//!
//! The minimum number of those spaces is defined in
//! [`HARD_BREAK_PREFIX_SIZE_MIN`][hard_break_prefix_size_min].
//! [`HARD_BREAK_PREFIX_SIZE_MIN`][].
//!
//! It is also possible to create a hard break with a similar construct: a
//! [hard break (escape)][hard_break_escape] is a backslash followed
Expand Down
4 changes: 3 additions & 1 deletion src/util/sanitize_uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn sanitize(value: &str) -> String {

/// Make a value safe for injection as a URL, and check protocols.
///
/// This first uses [`sanitize`][sanitize].
/// This first uses [`sanitize`][].
/// Then, a vec of (lowercase) allowed protocols can be given, in which case
/// the URL is ignored or kept.
///
Expand Down Expand Up @@ -127,6 +127,8 @@ fn normalize(value: &str) -> String {
{
result.push_str(&chars[start..index].iter().collect::<String>());
char.encode_utf8(&mut buff);

#[allow(clippy::format_collect)]
result.push_str(
&buff[0..char.len_utf8()]
.iter()
Expand Down

0 comments on commit 07ec266

Please sign in to comment.