Trevor Spiteri
b41bc7b33b
deserialize to String instead of &str for serde-str
...
This is because for example serde-xml-rs cannot deserialize a string
into a borrowed string.
This also makes serde-str depend on the std feature.
2020-10-09 18:11:40 +02:00
Trevor Spiteri
197650872d
add serde-str experimental feature
2020-10-09 14:41:10 +02:00
Trevor Spiteri
75d8d2ef93
add serde impls for Unwrapped types
2020-10-02 14:16:52 +02:00
Trevor Spiteri
3e1c1a642d
add comment to FromStrRadix about radix limitations
2020-09-30 14:07:39 +02:00
Trevor Spiteri
71a5e9d7e1
reduce use of explicit lifetimes in trait implementation
2020-09-22 19:30:16 +02:00
Trevor Spiteri
36e6e6e0a6
loosen tarpaulin check requirement
2020-09-22 19:28:35 +02:00
Trevor Spiteri
a0ea3f2c60
loosen Rhs constraint on MulAssign
2020-09-22 19:09:41 +02:00
Trevor Spiteri
0aa8af089f
add mul_add to Wrapping and Unwrapped
2020-09-22 17:20:13 +02:00
Trevor Spiteri
88f67dc43d
ci: add unwrapped feature
2020-09-22 16:50:12 +02:00
Trevor Spiteri
b4064938d2
implement num_traits::mul_add::MulAdd
2020-09-22 16:41:41 +02:00
Trevor Spiteri
03436b19b5
typo
2020-09-22 15:47:29 +02:00
Trevor Spiteri
a3d947776d
add mul_add methods
2020-09-22 15:47:13 +02:00
Trevor Spiteri
b53fb709bf
fix compilation without unwrapped feature
2020-09-17 21:28:57 +02:00
Trevor Spiteri
9e8d74d1ad
add Unwrapped wrapper
2020-09-17 20:22:53 +02:00
Trevor Spiteri
c7c57b09f0
fix doc links
2020-09-17 20:03:55 +02:00
Trevor Spiteri
c1119a0d12
add unwrapped from_num and to_num methods
2020-09-17 19:13:32 +02:00
Trevor Spiteri
8756a4bd5c
add unwrapped arithmetic methods
2020-09-17 18:40:32 +02:00
Trevor Spiteri
ff9211e9ab
add unwrapped rounding methods
2020-09-17 18:03:05 +02:00
Trevor Spiteri
7a03bd6364
add unwrapped experimental feature
2020-09-17 16:58:26 +02:00
Trevor Spiteri
1b5a5b39ae
version 1.2.0
2020-09-02 13:50:04 +02:00
Trevor Spiteri
5e8c87c43a
stronger typing inside const_fixed_from_int macro
2020-09-02 13:49:29 +02:00
Trevor Spiteri
22d1551b97
fix a couple of const_fixed_from_int compile_fail tests
2020-09-02 13:25:24 +02:00
Trevor Spiteri
d112d55e21
Revert "require rustc 1.46"
...
This reverts commit 5a4d1a6732
.
2020-09-02 13:03:23 +02:00
Trevor Spiteri
0771d5b218
Revert "remove if_cond_else const hack"
...
This reverts commit 7522557e1d
.
2020-09-02 13:03:16 +02:00
Trevor Spiteri
be0fd36bf5
const_fixed_from_int implementation that works on rustc 1.44
2020-09-02 12:58:28 +02:00
Trevor Spiteri
c6ea032292
ci: tarpaulin
...
coverage measure changed with 1.47 beta
2020-09-02 12:32:02 +02:00
Trevor Spiteri
78cff5601b
const_fixed_from_int tweaks
2020-09-02 12:22:01 +02:00
Trevor Spiteri
7522557e1d
remove if_cond_else const hack
2020-09-02 10:22:44 +02:00
Trevor Spiteri
5a4d1a6732
require rustc 1.46
2020-09-02 10:14:04 +02:00
Trevor Spiteri
c5fe7e6764
fix corner cases of const_fixed_from_int
2020-09-02 10:10:29 +02:00
Trevor Spiteri
67f697ece5
add const_fixed_from_int compile_fail tests
2020-09-02 09:59:35 +02:00
Trevor Spiteri
f95c76651a
add const_fixed_from_int! macro
2020-08-28 18:27:23 +02:00
Trevor Spiteri
5b911fc62c
version 1.1.0
2020-07-21 08:42:56 +02:00
Trevor Spiteri
2351e9a4c8
document num-traits experimental feature in release notes
2020-07-16 12:37:46 +02:00
Trevor Spiteri
cb59eeb843
ci: shorten windows tests
2020-07-16 11:13:17 +02:00
Trevor Spiteri
b60e8ad9ab
add num-trait traits to FixedOptionalFeatures
2020-07-16 11:07:25 +02:00
Trevor Spiteri
be85c31da8
ci: test building with num-traits feature
2020-07-16 10:35:00 +02:00
Trevor Spiteri
3dae86ec18
implement num_traits checked ops
2020-07-14 09:11:58 +02:00
Trevor Spiteri
670f04441b
implement num_traits::{Bounded,Zero,One}
2020-07-13 15:19:21 +02:00
Trevor Spiteri
edbec7062a
add experimental feature num-traits
2020-07-13 15:19:15 +02:00
Trevor Spiteri
fcdd018240
version 1.0.0
2020-06-04 18:59:55 +02:00
Trevor Spiteri
ef36b4f767
make {from,to}_{be,le,ne}_bytes const functions
2020-06-04 18:18:01 +02:00
Trevor Spiteri
cd8ee00eac
Merge branch 'v0.5'
2020-05-11 20:20:02 +02:00
Trevor Spiteri
2bfc804c4d
version 0.5.7
2020-05-11 20:13:11 +02:00
Trevor Spiteri
15ce6efad5
add comment to signed round_to_zero about not being truncation
2020-05-11 19:58:09 +02:00
Trevor Spiteri
13010d6ed9
docs: change wording from truncate to discard fractional bits
...
Truncation might be interpreted to mean rounding towards zero, which
is not what happens in negative two's-complement fixed-point numbers.
So "extra fractional bits are truncated" is better as "extra
fractional bits are discarded, which rounds towards −∞."
2020-05-11 19:58:05 +02:00
Trevor Spiteri
1eca782f60
add wrapping_next_power_of_two
2020-05-11 19:57:42 +02:00
Trevor Spiteri
8227ae5dd7
add leading_ones and trailing_ones
2020-05-11 19:55:35 +02:00
Trevor Spiteri
41d57b242f
fmt nit in doc example
2020-05-11 19:53:25 +02:00
Trevor Spiteri
7b9097191f
add some tests
2020-05-11 19:53:22 +02:00