Merge remote-tracking branch 'origin/main' into update-lv-tlv
This commit is contained in:
commit
2d81a79321
@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Added `raw_data` API for `Tlv` and `Lv` to retrieve the whole `Lv`/`Tlv` slice if the object
|
- Added `raw_data` API for `Tlv` and `Lv` to retrieve the whole `Lv`/`Tlv` slice if the object
|
||||||
was created from a raw bytestream.
|
was created from a raw bytestream.
|
||||||
- Added `MsgToUserTlv` helper class which wraps a regular `Tlv` and adds some useful functionality.
|
- Added `MsgToUserTlv` helper class which wraps a regular `Tlv` and adds some useful functionality.
|
||||||
|
- `UnsignedByteField` and `GenericUnsignedByteField` `new` methods are `const` now.
|
||||||
|
|
||||||
# [v0.7.0-beta.0] 2023-08-16
|
# [v0.7.0-beta.0] 2023-08-16
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ pub struct UnsignedByteField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl UnsignedByteField {
|
impl UnsignedByteField {
|
||||||
pub fn new(width: usize, value: u64) -> Self {
|
pub const fn new(width: usize, value: u64) -> Self {
|
||||||
Self { width, value }
|
Self { width, value }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ pub struct GenericUnsignedByteField<TYPE> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<TYPE> GenericUnsignedByteField<TYPE> {
|
impl<TYPE> GenericUnsignedByteField<TYPE> {
|
||||||
pub fn new(val: TYPE) -> Self {
|
pub const fn new(val: TYPE) -> Self {
|
||||||
Self { value: val }
|
Self { value: val }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user