Skip to content

Commit

Permalink
Enable clippy and update hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Sep 2, 2023
1 parent ee24ed0 commit 7ca8a78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,23 @@ repos:
rev: "v1.0"
hooks:
- id: fmt
- id: clippy
args: [--fix]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: "6.0.0"
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.10.1
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- name: black
id: black
args: ["--line-length", "79"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.4"
rev: "v3.0.3"
hooks:
- id: prettier
5 changes: 1 addition & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ impl RegexPy {
}

fn find(&self, value: &str) -> Option<MatchPy> {
match self.inner.find(value) {
Some(inner) => Some(MatchPy { inner }),
None => None,
}
self.inner.find(value).map(|inner| MatchPy { inner })
}

fn find_iter(&self, value: &str) -> Vec<MatchPy> {
Expand Down

0 comments on commit 7ca8a78

Please sign in to comment.