Skip to content

Commit

Permalink
Fix some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jan 8, 2024
1 parent 5cbbbfc commit 2631d0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/egui_plot/src/items/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,7 @@ impl BoxPlot {

/// Add a custom way to format an element.
/// Can be used to display a set number of decimals or custom labels.
#[inline]
pub fn element_formatter(mut self, formatter: Box<dyn Fn(&BoxElem, &Self) -> String>) -> Self {
self.element_formatter = Some(formatter);
self
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def lint_lines(filepath, lines_in):
)
lines_out.append("\n")

if re.search(r"\(mut self.*-> Self", line):
if re.search(r"\(mut self.*-> Self", line) and "pub(crate)" not in line:
if prev_line.strip() != "#[inline]":
errors.append(
f"{filepath}:{line_nr}: builder methods should be marked #[inline]"
Expand Down

0 comments on commit 2631d0f

Please sign in to comment.