From 8db276fc5ba20df6c0c2f8f0073cbcb2781f1648 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 21 Oct 2024 10:35:12 +0800 Subject: [PATCH 1/6] docs: Cross-reference source code view --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 97c7ed7..0e9372d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ include.workspace = true [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] [package.metadata.release] pre-release-replacements = [ From e121dd6ef9e11dfa818a813bbaffb12a16cd174e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 21 Oct 2024 15:39:54 +0800 Subject: [PATCH 2/6] chore(ci): Fix STABLE updates See rust-lang/cargo#14704 --- .github/renovate.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index c184420..7ab13b9 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -32,7 +32,7 @@ matchManagers: [ 'custom.regex', ], - matchPackageNames: [ + matchDepNames: [ 'STABLE', ], extractVersion: '^(?\\d+\\.\\d+)', // Drop the patch version From afa23ae258a1a6ec9f2268cd0b57c20a88dea3be Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 1 Nov 2024 15:36:16 -0500 Subject: [PATCH 3/6] style: Ignore large Err variants --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 0e9372d..7e38ce3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,6 +70,7 @@ rc_mutex = "warn" redundant_feature_names = "warn" ref_option_ref = "warn" rest_pat_in_fully_bound_structs = "warn" +result_large_err = "allow" same_functions_in_if_condition = "warn" self_named_module_files = "warn" semicolon_if_nothing_returned = "warn" From 006f98fb3a3e4d4a3054c9fc0ea33906a3e42d44 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 18 Nov 2024 13:48:49 -0600 Subject: [PATCH 4/6] chore(ci): Report deprecations in the review --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d49017e..9fb9591 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -144,7 +144,7 @@ jobs: run: cargo install sarif-fmt --locked - name: Check run: > - cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated + cargo clippy --workspace --all-features --all-targets --message-format=json | clippy-sarif | tee clippy-results.sarif | sarif-fmt From 810013723912ca4faf8fbc87fc2ed25b2a531516 Mon Sep 17 00:00:00 2001 From: futreall <86553580+futreall@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:16:58 +0200 Subject: [PATCH 5/6] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b0318b8..e9fca37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ Specifically, we would encourage - File renames be isolated into their own commit - Add tests in a commit before their feature or fix, showing the current behavior. The diff for the feature/fix commit will then show how the behavior changed, - making it clearer to reviewrs and the community and showing people that the + making it clearer to reviewers and the community and showing people that the test is verifying the expected state. - e.g. [clap#5520](https://github.com/clap-rs/clap/pull/5520) From 7bd4180a4218c46925ca2f9e30a28a10655e65cd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 2 Dec 2024 11:04:06 -0600 Subject: [PATCH 6/6] style: Make clippy happy --- src/renderer/display_list.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/display_list.rs b/src/renderer/display_list.rs index 8884b0d..c2cb82b 100644 --- a/src/renderer/display_list.rs +++ b/src/renderer/display_list.rs @@ -55,13 +55,13 @@ pub(crate) struct DisplayList<'a> { pub(crate) anonymized_line_numbers: bool, } -impl<'a> PartialEq for DisplayList<'a> { +impl PartialEq for DisplayList<'_> { fn eq(&self, other: &Self) -> bool { self.body == other.body && self.anonymized_line_numbers == other.anonymized_line_numbers } } -impl<'a> fmt::Debug for DisplayList<'a> { +impl fmt::Debug for DisplayList<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("DisplayList") .field("body", &self.body) @@ -70,7 +70,7 @@ impl<'a> fmt::Debug for DisplayList<'a> { } } -impl<'a> Display for DisplayList<'a> { +impl Display for DisplayList<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let lineno_width = self.body.iter().fold(0, |max, set| { set.display_lines.iter().fold(max, |max, line| match line { @@ -156,7 +156,7 @@ pub(crate) struct DisplaySet<'a> { pub(crate) margin: Margin, } -impl<'a> DisplaySet<'a> { +impl DisplaySet<'_> { fn format_label( &self, line_offset: usize, @@ -791,7 +791,7 @@ pub(crate) struct DisplaySourceAnnotation<'a> { pub(crate) annotation_part: DisplayAnnotationPart, } -impl<'a> DisplaySourceAnnotation<'a> { +impl DisplaySourceAnnotation<'_> { fn has_label(&self) -> bool { !self .annotation @@ -932,7 +932,7 @@ pub(crate) enum DisplayHeaderType { struct CursorLines<'a>(&'a str); -impl<'a> CursorLines<'a> { +impl CursorLines<'_> { fn new(src: &str) -> CursorLines<'_> { CursorLines(src) }