File tree 6 files changed +8
-0
lines changed
6 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -47,11 +47,13 @@ impl Decimal {
47
47
}
48
48
49
49
/// Create a 1.0 Decimal
50
+ #[ inline]
50
51
pub const fn one ( ) -> Self {
51
52
Self ( Self :: DECIMAL_FRACTIONAL )
52
53
}
53
54
54
55
/// Create a 0.0 Decimal
56
+ #[ inline]
55
57
pub const fn zero ( ) -> Self {
56
58
Self ( Uint128 :: zero ( ) )
57
59
}
Original file line number Diff line number Diff line change @@ -57,11 +57,13 @@ impl Decimal256 {
57
57
}
58
58
59
59
/// Create a 1.0 Decimal256
60
+ #[ inline]
60
61
pub const fn one ( ) -> Self {
61
62
Self ( Self :: DECIMAL_FRACTIONAL )
62
63
}
63
64
64
65
/// Create a 0.0 Decimal256
66
+ #[ inline]
65
67
pub const fn zero ( ) -> Self {
66
68
Self ( Uint256 :: zero ( ) )
67
69
}
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ impl Uint128 {
45
45
}
46
46
47
47
/// Creates a Uint128(0)
48
+ #[ inline]
48
49
pub const fn zero ( ) -> Self {
49
50
Uint128 ( 0 )
50
51
}
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ impl Uint256 {
62
62
}
63
63
64
64
/// Creates a Uint256(0)
65
+ #[ inline]
65
66
pub const fn zero ( ) -> Self {
66
67
Uint256 ( U256 :: zero ( ) )
67
68
}
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ impl Uint512 {
62
62
}
63
63
64
64
/// Creates a Uint512(0)
65
+ #[ inline]
65
66
pub const fn zero ( ) -> Self {
66
67
Uint512 ( U512 :: zero ( ) )
67
68
}
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ impl Uint64 {
41
41
}
42
42
43
43
/// Creates a Uint64(0)
44
+ #[ inline]
44
45
pub const fn zero ( ) -> Self {
45
46
Uint64 ( 0 )
46
47
}
You can’t perform that action at this time.
0 commit comments