Skip to content

Commit

Permalink
syntax: fix clippy lints up to rust 1.41.1
Browse files Browse the repository at this point in the history
Some lints have been intentionally ignored, especially:

* any lints that would change public APIs (like &self -> self)
* any lints that would introduce new public APIs (like Default over new)
  • Loading branch information
marmeladema authored and BurntSushi committed Jul 5, 2022
1 parent b87cd88 commit de83828
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 131 deletions.
4 changes: 2 additions & 2 deletions regex-syntax/src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ impl PartialOrd for Position {
impl Span {
/// Create a new span with the given positions.
pub fn new(start: Position, end: Position) -> Span {
Span { start: start, end: end }
Span { start, end }
}

/// Create a new span using the given position as the start and end.
Expand Down Expand Up @@ -427,7 +427,7 @@ impl Position {
///
/// `column` is the approximate column number, starting at `1`.
pub fn new(offset: usize, line: usize, column: usize) -> Position {
Position { offset: offset, line: line, column: column }
Position { offset, line, column }
}
}

Expand Down
Loading

0 comments on commit de83828

Please sign in to comment.