Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update from _rust template #164

Merged
merged 8 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
matchManagers: [
'custom.regex',
],
matchPackageNames: [
matchDepNames: [
'STABLE',
],
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -99,7 +100,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]
tag-name = "{{version}}"
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/display_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
Loading