Skip to content

Commit de83828

Browse files
marmelademaBurntSushi
authored andcommitted
syntax: fix clippy lints up to rust 1.41.1
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)
1 parent b87cd88 commit de83828

File tree

10 files changed

+98
-131
lines changed

10 files changed

+98
-131
lines changed

regex-syntax/src/ast/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl PartialOrd for Position {
385385
impl Span {
386386
/// Create a new span with the given positions.
387387
pub fn new(start: Position, end: Position) -> Span {
388-
Span { start: start, end: end }
388+
Span { start, end }
389389
}
390390

391391
/// Create a new span using the given position as the start and end.
@@ -427,7 +427,7 @@ impl Position {
427427
///
428428
/// `column` is the approximate column number, starting at `1`.
429429
pub fn new(offset: usize, line: usize, column: usize) -> Position {
430-
Position { offset: offset, line: line, column: column }
430+
Position { offset, line, column }
431431
}
432432
}
433433

0 commit comments

Comments
 (0)