Skip to content

Commit

Permalink
Merge pull request #164 from epage/template
Browse files Browse the repository at this point in the history
chore: Update from _rust template
  • Loading branch information
epage authored Dec 2, 2024
2 parents 9625bc0 + 7bd4180 commit ed381e4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
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

0 comments on commit ed381e4

Please sign in to comment.