Enable clippy::needless_arbitrary_self_type
(#8743)
This PR enables the [`clippy::needless_arbitrary_self_type`](https://rust-lang.github.io/rust-clippy/master/index.html#/needless_arbitrary_self_type) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
008c5053e6
commit
4097e8870b
2 changed files with 3 additions and 4 deletions
|
@ -847,7 +847,7 @@ impl DisplaySnapshot {
|
||||||
self.block_snapshot.longest_row()
|
self.block_snapshot.longest_row()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fold_for_line(self: &Self, buffer_row: u32) -> Option<FoldStatus> {
|
pub fn fold_for_line(&self, buffer_row: u32) -> Option<FoldStatus> {
|
||||||
if self.is_line_folded(buffer_row) {
|
if self.is_line_folded(buffer_row) {
|
||||||
Some(FoldStatus::Folded)
|
Some(FoldStatus::Folded)
|
||||||
} else if self.is_foldable(buffer_row) {
|
} else if self.is_foldable(buffer_row) {
|
||||||
|
@ -857,7 +857,7 @@ impl DisplaySnapshot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_foldable(self: &Self, buffer_row: u32) -> bool {
|
pub fn is_foldable(&self, buffer_row: u32) -> bool {
|
||||||
let max_row = self.buffer_snapshot.max_buffer_row();
|
let max_row = self.buffer_snapshot.max_buffer_row();
|
||||||
if buffer_row >= max_row {
|
if buffer_row >= max_row {
|
||||||
return false;
|
return false;
|
||||||
|
@ -880,7 +880,7 @@ impl DisplaySnapshot {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn foldable_range(self: &Self, buffer_row: u32) -> Option<Range<Point>> {
|
pub fn foldable_range(&self, buffer_row: u32) -> Option<Range<Point>> {
|
||||||
let start = Point::new(buffer_row, self.buffer_snapshot.line_len(buffer_row));
|
let start = Point::new(buffer_row, self.buffer_snapshot.line_len(buffer_row));
|
||||||
if self.is_foldable(start.row) && !self.is_line_folded(start.row) {
|
if self.is_foldable(start.row) && !self.is_line_folded(start.row) {
|
||||||
let (start_indent, _) = self.line_indent_for_buffer_row(buffer_row);
|
let (start_indent, _) = self.line_indent_for_buffer_row(buffer_row);
|
||||||
|
|
|
@ -101,7 +101,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
|
||||||
"clippy::iter_overeager_cloned",
|
"clippy::iter_overeager_cloned",
|
||||||
"clippy::let_underscore_future",
|
"clippy::let_underscore_future",
|
||||||
"clippy::map_entry",
|
"clippy::map_entry",
|
||||||
"clippy::needless_arbitrary_self_type",
|
|
||||||
"clippy::needless_borrowed_reference",
|
"clippy::needless_borrowed_reference",
|
||||||
"clippy::needless_lifetimes",
|
"clippy::needless_lifetimes",
|
||||||
"clippy::needless_option_as_deref",
|
"clippy::needless_option_as_deref",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue