Skip to content

Commit eeb6be4

Browse files
committed
Fix clippy lints up to rust 1.41.1 in regex-syntax crate
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 6cdb904 commit eeb6be4

File tree

13 files changed

+108
-139
lines changed

13 files changed

+108
-139
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)