Skip to content

Commit 07ec266

Browse files
committed
Refactor code-style for clipp changes
1 parent 8ea1401 commit 07ec266

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

src/construct/autolink.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
//! ```
2222
//!
2323
//! The maximum allowed size of a scheme is `31` (inclusive), which is defined
24-
//! in [`AUTOLINK_SCHEME_SIZE_MAX`][autolink_scheme_size_max].
24+
//! in [`AUTOLINK_SCHEME_SIZE_MAX`][].
2525
//! The maximum allowed size of a domain is `63` (inclusive), which is defined
26-
//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][autolink_domain_size_max].
26+
//! in [`AUTOLINK_DOMAIN_SIZE_MAX`][].
2727
//!
2828
//! The grammar for autolinks is quite strict and prohibits the use of ASCII control
2929
//! characters or spaces.

src/construct/gfm_footnote_definition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//!
3030
//! Definitions match to calls through identifiers.
3131
//! To match, both labels must be equal after normalizing with
32-
//! [`normalize_identifier`][normalize_identifier].
32+
//! [`normalize_identifier`][].
3333
//! One definition can match to multiple calls.
3434
//! Multiple definitions with the same, normalized, identifier are ignored: the
3535
//! first definition is preferred.

src/construct/html_flow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@
6868
//! typically kick-in instead.
6969
//!
7070
//! The list of tag names allowed in the **raw** production are defined in
71-
//! [`HTML_RAW_NAMES`][html_raw_names].
71+
//! [`HTML_RAW_NAMES`][].
7272
//! This production exists because there are a few cases where markdown
7373
//! *inside* some elements, and hence interleaving, does not make sense.
7474
//!
7575
//! The list of tag names allowed in the **basic** production are defined in
76-
//! [`HTML_BLOCK_NAMES`][html_block_names].
76+
//! [`HTML_BLOCK_NAMES`][].
7777
//! This production exists because there are a few cases where we can decide
7878
//! early that something is going to be a flow (block) element instead of a
7979
//! phrasing (inline) element.

src/construct/label_end.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! interpreting the text provided between the first, implicit, label (`x`).
3030
//! To match, the effective label of the reference must be equal to the label
3131
//! of the definition after normalizing with
32-
//! [`normalize_identifier`][normalize_identifier].
32+
//! [`normalize_identifier`][].
3333
//!
3434
//! Importantly, while the label of a full reference *can* include [string][]
3535
//! content, and in case of collapsed and shortcut references even [text][]

src/construct/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
//!
3535
//! The following constructs are found in markdown (`CommonMark`):
3636
//!
37-
//! * [attention][attention] (strong, emphasis, extension: GFM strikethrough)
37+
//! * [attention][] (strong, emphasis, extension: GFM strikethrough)
3838
//! * [autolink][]
3939
//! * [blank line][blank_line]
4040
//! * [block quote][block_quote]

src/construct/partial_label.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//!
1717
//! The maximum allowed size of the label, without the brackets, is `999`
1818
//! (inclusive), which is defined in
19-
//! [`LINK_REFERENCE_SIZE_MAX`][link_reference_size_max].
19+
//! [`LINK_REFERENCE_SIZE_MAX`][].
2020
//!
2121
//! Labels can contain line endings and whitespace, but they are not allowed to
2222
//! contain blank lines, and they must not be blank themselves.

src/construct/partial_whitespace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! consistents solely of spaces, at least 2, forms a hard break (trailing).
1919
//!
2020
//! The minimum number of those spaces is defined in
21-
//! [`HARD_BREAK_PREFIX_SIZE_MIN`][hard_break_prefix_size_min].
21+
//! [`HARD_BREAK_PREFIX_SIZE_MIN`][].
2222
//!
2323
//! It is also possible to create a hard break with a similar construct: a
2424
//! [hard break (escape)][hard_break_escape] is a backslash followed

src/util/sanitize_uri.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn sanitize(value: &str) -> String {
2929

3030
/// Make a value safe for injection as a URL, and check protocols.
3131
///
32-
/// This first uses [`sanitize`][sanitize].
32+
/// This first uses [`sanitize`][].
3333
/// Then, a vec of (lowercase) allowed protocols can be given, in which case
3434
/// the URL is ignored or kept.
3535
///
@@ -127,6 +127,8 @@ fn normalize(value: &str) -> String {
127127
{
128128
result.push_str(&chars[start..index].iter().collect::<String>());
129129
char.encode_utf8(&mut buff);
130+
131+
#[allow(clippy::format_collect)]
130132
result.push_str(
131133
&buff[0..char.len_utf8()]
132134
.iter()

0 commit comments

Comments
 (0)