diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 97d1164..e124000 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Build run: cargo build --verbose - name: Check formatting diff --git a/src/lib.rs b/src/lib.rs index d45000f..d3a85e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -247,7 +247,7 @@ impl Personnummer { /// Check if the person holding the personal identity number is a female. pub fn is_female(&self) -> bool { - (self.serial % 10) % 2 == 0 + (self.serial % 10).is_multiple_of(2) } /// Check if the person holding the personal identity number is a male.