Skip to content

Commit

Permalink
Add From<T> where T: From<BigInt> instance for ItfBigInt
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Nov 10, 2023
1 parent 6eba8e9 commit 07e8106
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v0.1.2

- Add `From<T> where T: From<BigInt>` instance for `ItfBigInt`

## v0.1.1

- Add support for new `timestamp` field in meta section of ITF traces
Expand Down
9 changes: 9 additions & 0 deletions itf/src/itf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ deserialize_itf_tuple!(7, 0 A 1 B 2 C 3 D 4 E 5 F 6 G);
// deserialize_itf_tuple!(11, 0 A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10 K);
// deserialize_itf_tuple!(12, 0 A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10 K 11 L);

impl<T> From<T> for ItfBigInt
where
BigInt: From<T>,
{
fn from(t: T) -> Self {
Itf(BigInt::from(t))
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 07e8106

Please sign in to comment.