diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 29bc52d..903a694 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -27,7 +27,7 @@ jobs: command: fmt args: --all -- --check - cllippy: + clippy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/bench/src/main.rs b/bench/src/main.rs index cf73b89..6eefd80 100644 --- a/bench/src/main.rs +++ b/bench/src/main.rs @@ -135,12 +135,12 @@ fn benchmark_print_result(res: &BenchmarkResult) { if res.qoi.decode_time.is_zero() { 0.0 } else { - px / (res.qoi.decode_time.as_secs_f64() * 1000_000.0) + px / (res.qoi.decode_time.as_secs_f64() * 1_000_000.0) }, if res.qoi.encode_time.is_zero() { 0.0 } else { - px / (res.qoi.encode_time.as_secs_f64() * 1000_000.0) + px / (res.qoi.encode_time.as_secs_f64() * 1_000_000.0) }, res.qoi.size / 1024, ); @@ -151,12 +151,12 @@ fn benchmark_print_result(res: &BenchmarkResult) { if res.rapid_qoi.decode_time.is_zero() { 0.0 } else { - px / (res.rapid_qoi.decode_time.as_secs_f64() * 1000_000.0) + px / (res.rapid_qoi.decode_time.as_secs_f64() * 1_000_000.0) }, if res.rapid_qoi.encode_time.is_zero() { 0.0 } else { - px / (res.rapid_qoi.encode_time.as_secs_f64() * 1000_000.0) + px / (res.rapid_qoi.encode_time.as_secs_f64() * 1_000_000.0) }, res.rapid_qoi.size / 1024, ); diff --git a/src/lib.rs b/src/lib.rs index b97ed6e..d4036e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -524,7 +524,7 @@ pub enum Colors { /// SRGB color channels and linear alpha channel. SrgbLinA, - /// Lineear color channels. + /// Linear color channels. Rgb, /// Linear color and alpha channels. @@ -542,8 +542,8 @@ impl Colors { } } - /// Returns `true` if color space has alpha channel. - /// Returns `false` otherwise. + /// Returns `4` if color space has alpha channel. + /// Returns `3` otherwise. #[inline] pub const fn channels(&self) -> usize { match self {