Skip to content

Commit

Permalink
Merge pull request #15 from boydjohnson/clippy-cleanup
Browse files Browse the repository at this point in the history
Clippy cleanup
  • Loading branch information
boydjohnson authored Dec 13, 2020
2 parents 6a5b676 + 3602cec commit be73a03
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
- checkout
- run: cargo test
- run: cargo fmt -- --check
- run: cargo clean
- run: cargo clippy -- -D clippy::all
- run: cargo build
workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "space-time"
version = "0.1.2"
version = "0.1.3"
authors = ["Boyd Johnson <[email protected]>"]
description = "A nightly only library of space-time filling curves that supports no-std."
license-file = "LICENSE.txt"
Expand Down
1 change: 1 addition & 0 deletions src/xzorder/xz3_sfc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ impl XZ3SFC {
}

/// Compute the index range that are contained or overlap the bounding box.
#[allow(clippy::too_many_arguments)]
pub fn ranges(
&self,
xmin: f64,
Expand Down
12 changes: 6 additions & 6 deletions src/zorder/z_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ impl ZN for Z2 {
fn split(value: u32) -> u64 {
let mut x = value.into();
x &= Self::MAX_MASK;
x = (x | (x << 32)) & 0x0000_0000_ffff_ffff as u64;
x = (x | (x << 16)) & 0x0000_ffff_0000_ffff as u64;
x = (x | (x << 8)) & 0x00ff_00ff_00ff_00ff as u64;
x = (x | (x << 4)) & 0x0f0f_0f0f_0f0f_0f0f as u64;
x = (x | (x << 2)) & 0x3333_3333_3333_3333 as u64;
x = (x | (x << 1)) & 0x5555_5555_5555_5555 as u64;
x = (x | (x << 32)) & 0x0000_0000_ffff_ffff_u64;
x = (x | (x << 16)) & 0x0000_ffff_0000_ffff_u64;
x = (x | (x << 8)) & 0x00ff_00ff_00ff_00ff_u64;
x = (x | (x << 4)) & 0x0f0f_0f0f_0f0f_0f0f_u64;
x = (x | (x << 2)) & 0x3333_3333_3333_3333_u64;
x = (x | (x << 1)) & 0x5555_5555_5555_5555_u64;
x
}

Expand Down
11 changes: 6 additions & 5 deletions src/zorder/z_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ impl ZN for Z3 {
fn split(value: u32) -> u64 {
let mut x: u64 = value.into();
x &= Self::MAX_MASK;
x = (x | x << 32) & 0x1f_0000_0000_ffff as u64;
x = (x | x << 16) & 0x1f_0000_ff00_00ff as u64;
x = (x | x << 8) & 0x100f_00f0_0f00_f00f as u64;
x = (x | x << 4) & 0x10c3_0c30_c30c_30c3 as u64;
x = (x | x << 2) & 0x1249_2492_4924_9249 as u64;
x = (x | x << 32) & 0x1f_0000_0000_ffff_u64;
x = (x | x << 16) & 0x1f_0000_ff00_00ff_u64;
x = (x | x << 8) & 0x100f_00f0_0f00_f00f_u64;
x = (x | x << 4) & 0x10c3_0c30_c30c_30c3_u64;
x = (x | x << 2) & 0x1249_2492_4924_9249_u64;
x
}

Expand Down Expand Up @@ -229,6 +229,7 @@ impl ZCurve3D {

/// Return the `IndexRange`s that cover the bounding box and time range.
#[must_use]
#[allow(clippy::too_many_arguments)]
pub fn ranges(
&self,
x_min: f64,
Expand Down

0 comments on commit be73a03

Please sign in to comment.