Skip to content

Commit

Permalink
release: 0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshstoik1 committed Oct 16, 2023
2 parents d00d364 + 7fa549e commit 971ce81
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Changelog


## [0.3.2](https://github.com/Blobfolio/cdtoc/releases/tag/v0.3.2) - 2023-10-15

### Changed

* Bump `dactyl` to `0.6`



## [0.3.1](https://github.com/Blobfolio/cdtoc/releases/tag/v0.3.1) - 2023-10-05

### Changed
Expand Down
7 changes: 3 additions & 4 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Project Dependencies
Package: cdtoc
Version: 0.3.1
Generated: 2023-10-05 19:36:02 UTC
Version: 0.3.2
Generated: 2023-10-16 01:35:13 UTC

| Package | Version | Author(s) | License |
| ---- | ---- | ---- | ---- |
| [block-buffer](https://github.com/RustCrypto/utils) | 0.10.4 | RustCrypto Developers | Apache-2.0 or MIT |
| [cfg-if](https://github.com/alexcrichton/cfg-if) | 1.0.0 | [Alex Crichton](mailto:alex@alexcrichton.com) | Apache-2.0 or MIT |
| [crypto-common](https://github.com/RustCrypto/traits) | 0.1.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.5.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [dactyl](https://github.com/Blobfolio/dactyl) | 0.6.0 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [digest](https://github.com/RustCrypto/traits) | 0.10.7 | RustCrypto Developers | Apache-2.0 or MIT |
| [faster-hex](https://github.com/NervosFoundation/faster-hex) | 0.8.1 | [zhangsoledad](mailto:787953403@qq.com) | MIT |
| [generic-array](https://github.com/fizyk20/generic-array.git) | 0.14.7 | [Bartłomiej Kamiński](mailto:fizyk20@gmail.com) and [Aaron Trent](mailto:novacrazy@gmail.com) | MIT |
| [itoa](https://github.com/dtolnay/itoa) | 1.0.9 | [David Tolnay](mailto:dtolnay@gmail.com) | Apache-2.0 or MIT |
| [num-traits](https://github.com/rust-num/num-traits) | 0.2.16 | The Rust Project Developers | Apache-2.0 or MIT |
| [sha1](https://github.com/RustCrypto/hashes) | 0.10.6 | RustCrypto Developers | Apache-2.0 or MIT |
| [trimothy](https://github.com/Blobfolio/trimothy) | 0.2.2 | [Blobfolio, LLC.](mailto:hello@blobfolio.com) | WTFPL |
| [typenum](https://github.com/paholg/typenum) | 1.17.0 | [Paho Lurie-Gregg](mailto:paho@paholg.com) and [Andre Bogus](mailto:bogusandre@gmail.com) | Apache-2.0 or MIT |
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cdtoc"
version = "0.3.1"
version = "0.3.2"
authors = ["Blobfolio, LLC. <hello@blobfolio.com>"]
edition = "2021"
rust-version = "1.70"
Expand Down Expand Up @@ -34,7 +34,7 @@ brunch = "0.5.*"
serde_json = "1.0.*"

[dependencies]
dactyl = "0.5.0"
dactyl = "0.6.0"
trimothy = "0.2.*"

[dependencies.faster-hex]
Expand Down
11 changes: 7 additions & 4 deletions src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
use crate::TocError;
use dactyl::{
NiceElapsed,
traits::NiceInflection,
traits::{
IntDivFloat,
NiceInflection,
},
};
use std::{
fmt,
Expand Down Expand Up @@ -206,7 +209,7 @@ impl Duration {
else { Err(TocError::CDDASampleCount) }
}

#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)]
#[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::integer_division)]
#[must_use]
/// # From Samples (Rescaled).
///
Expand All @@ -233,10 +236,10 @@ impl Duration {
if sample_rate == 0 || total_samples == 0 { Self::default() }
else {
let sample_rate = u64::from(sample_rate);
let (s, rem) = dactyl::div_mod(total_samples, sample_rate);
let (s, rem) = (total_samples / sample_rate, total_samples % sample_rate);
if rem == 0 { Self(s * SECTORS_PER_SECOND) }
else {
let f = dactyl::int_div_float(rem * 75, sample_rate)
let f = (rem * 75).div_float(sample_rate)
.map_or(0, |f| f.trunc() as u64);
Self(s * SECTORS_PER_SECOND + f)
}
Expand Down

0 comments on commit 971ce81

Please sign in to comment.