Skip to content

Commit ded7669

Browse files
committed
chore: Merge branch 'release/0.10.0'
2 parents bd5088f + 9404089 commit ded7669

File tree

17 files changed

+88
-78
lines changed

17 files changed

+88
-78
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [0.10.0](https://github.com/midi2-dev/bl-midi2-rs/compare/0.9.0..0.10.0) - 2025-07-27
4+
5+
### 🐛 Fixes
6+
7+
- Rust 1.90.0 clippy warnings - ([5f24196](https://github.com/midi2-dev/bl-midi2-rs/commit/5f24196b16171a65587ef3fbaa42673717af23ac))
8+
- U20 for Delta Clockstamp Ticks Since Last Event per spec - ([9bfa4de..2d5713e](https://github.com/midi2-dev/bl-midi2-rs/compare/9bfa4de5b399e42682993adacece0cd79c7cf038..2d5713e762f09e468cd0ec6ffb0d7037ce95df7f))
9+
- Clippy warnings from rust 1.87.0 - ([9bfa4de](https://github.com/midi2-dev/bl-midi2-rs/commit/9bfa4de5b399e42682993adacece0cd79c7cf038))
10+
11+
### 📚 Documentation
12+
13+
- Improve the wording and details of the contributing docs - ([](https://github.com/midi2-dev/bl-midi2-rs/commit/a30428f294c5ca6e8c97bf3cbc1f2436797893a6))
14+
15+
## New Contributors ❤️
16+
17+
* @dpezely made their first contribution in [#73](https://github.com/midi2-dev/bl-midi2-rs/pull/73)
18+
319
## [0.9.0](https://github.com/midi2-dev/bl-midi2-rs/compare/0.8.2..0.9.0) - 2025-05-13
420

521
### ✨ Features

CONTRIBUTOR.md renamed to CONTRIBUTING.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ or open a PR from your own fork to start a discussion ☺️..
88

99
## 🪝 Hooks 🪝
1010

11-
We recommend using the hooks while developing in this repository.
12-
The hooks manager is a python package which needs installing locally.
11+
It is recommended to use git hooks while developing in this repository.
12+
The hooks manager (pre-commit) is a python package which needs installing locally.
1313
The best way to do this is via a virtual environment.
1414

1515
```shell
@@ -22,18 +22,22 @@ The best way to do this is via a virtual environment.
2222
## 🧱 Building 🧱
2323

2424
To build, simply follow the usual cargo flow.
25+
2526
```shell
26-
> cargo build --all-features
27+
> cargo build --all --all-features
2728
```
2829

2930
## Tests
3031

31-
The project currently has a good unit tests coverage,
32+
The project currently has a unit test, and documentation test coverage,
3233
but no integration test coverage yet.
33-
To run the tests, follow the usual cargo flow.
34+
To run all the tests, follow the usual cargo flow.
35+
36+
When adding new features please try to cover the new code
37+
with appropriate unit test cases.
3438

3539
```shell
36-
> cargo test --all-features
40+
> cargo test --all --all-features
3741
```
3842

3943
## 🌍 A Tour of midi2 🌍

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ You'll want to setup midi2 without default features to compile
163163
without the `std` feature.
164164

165165
```toml
166-
midi2 = { version = "0.9.0", default-features = false, features = ["channel-voice2", "sysex7"], }
166+
midi2 = { version = "0.10.0", default-features = false, features = ["channel-voice2", "sysex7"], }
167167
```
168168

169169
### Generic Representation

midi2/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "midi2"
3-
version = "0.9.0"
3+
version = "0.10.0"
44
description = "Ergonomic, versatile, strong types wrapping MIDI 2.0 message data."
55
edition = "2021"
66
readme = "README.md"
@@ -17,7 +17,7 @@ manual_div_ceil = "allow"
1717
[dependencies]
1818
derive_more = { version = "2.0.1", features = ["from"], default-features = false }
1919
fixed = "1.28.0"
20-
midi2_proc = { version = "0.9.0", path = "../midi2_proc" }
20+
midi2_proc = { version = "0.10.0", path = "../midi2_proc" }
2121
ux = "0.1.6"
2222

2323
[dev-dependencies]

midi2/src/detail/common_properties.rs

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -165,60 +165,6 @@ impl<
165165
}
166166
}
167167

168-
pub struct BytesSchemaProperty<T, B: schema::BytesSchema>(core::marker::PhantomData<(T, B)>);
169-
170-
impl<
171-
B: Buffer,
172-
BytesSchema: schema::BytesSchema,
173-
T: Default + schema::BytesSchemaRepr<BytesSchema>,
174-
> Property<B> for BytesSchemaProperty<T, BytesSchema>
175-
{
176-
type Type = T;
177-
}
178-
179-
impl<
180-
'a,
181-
B: Buffer,
182-
BytesSchema: schema::BytesSchema,
183-
T: Default + schema::BytesSchemaRepr<BytesSchema>,
184-
> ReadProperty<'a, B> for BytesSchemaProperty<T, BytesSchema>
185-
{
186-
fn read(buffer: &'a B) -> Self::Type {
187-
match <B::Unit as UnitPrivate>::UNIT_ID {
188-
UNIT_ID_U32 => Default::default(),
189-
UNIT_ID_U8 => {
190-
<T as schema::BytesSchemaRepr<BytesSchema>>::read(buffer.buffer().specialise_u8())
191-
}
192-
_ => unreachable!(),
193-
}
194-
}
195-
fn validate(_buffer: &B) -> Result<(), crate::error::InvalidData> {
196-
Ok(())
197-
}
198-
}
199-
200-
impl<
201-
B: Buffer + BufferMut,
202-
BytesSchema: schema::BytesSchema,
203-
T: Default + schema::BytesSchemaRepr<BytesSchema>,
204-
> WriteProperty<B> for BytesSchemaProperty<T, BytesSchema>
205-
{
206-
fn write(buffer: &mut B, v: Self::Type) {
207-
if <B::Unit as UnitPrivate>::UNIT_ID == UNIT_ID_U8 {
208-
<T as schema::BytesSchemaRepr<BytesSchema>>::write(
209-
buffer.buffer_mut().specialise_u8_mut(),
210-
v,
211-
)
212-
}
213-
}
214-
fn validate(_v: &Self::Type) -> Result<(), crate::error::InvalidData> {
215-
Ok(())
216-
}
217-
fn default() -> Self::Type {
218-
Default::default()
219-
}
220-
}
221-
222168
pub struct UmpSchemaProperty<T, B: schema::UmpSchema>(core::marker::PhantomData<(T, B)>);
223169

224170
impl<B: Buffer, UmpSchema: schema::UmpSchema, T: Default + schema::UmpSchemaRepr<UmpSchema>>

midi2/src/flex_data/text.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<B: Ump + BufferMut> ResizeProperty<B> for TextWriteStrProperty<'_> {
6363

6464
fn ump_buffer_size_for_str(s: &str) -> usize {
6565
let str_size = s.len();
66-
if str_size % 12 == 0 {
66+
if str_size.is_multiple_of(12) {
6767
if str_size == 0 {
6868
4
6969
} else {
@@ -78,7 +78,7 @@ fn grow_buffer(mut buffer: &mut [u32], size: usize) {
7878
use crate::detail::BitOps;
7979
use crate::ux::{u2, u4};
8080

81-
debug_assert!(size % 4 == 0);
81+
debug_assert!(size.is_multiple_of(4));
8282
debug_assert!(size != 0);
8383

8484
let group = buffer[0].nibble(1);

midi2/src/packets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ impl core::iter::ExactSizeIterator for PacketsIterator<'_> {
7070
/// assert_eq!(packets.next(), None);
7171
/// ```
7272
pub trait Packets {
73-
fn packets(&self) -> PacketsIterator;
73+
fn packets<'a>(&'a self) -> PacketsIterator<'a>;
7474
}

midi2/src/sysex7.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ fn try_resize_ump<
808808
}
809809

810810
fn buffer_size_from_payload_size_ump(payload_size: usize) -> usize {
811-
if payload_size % 6 == 0 {
811+
if payload_size.is_multiple_of(6) {
812812
if payload_size == 0 {
813813
2
814814
} else {

midi2/src/sysex7/packet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl Packet {
135135
status_from_data(&self.0[..]).unwrap()
136136
}
137137

138-
pub fn payload(&self) -> PayloadIterator {
138+
pub fn payload<'a>(&'a self) -> PayloadIterator<'a> {
139139
PayloadIterator {
140140
data: &self.0,
141141
index: 0,

midi2/src/sysex8.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ fn try_resize<
565565
}
566566

567567
fn buffer_size_from_payload_size(payload_size: usize) -> usize {
568-
if payload_size % 13 == 0 {
568+
if payload_size.is_multiple_of(13) {
569569
if payload_size == 0 {
570570
4
571571
} else {

0 commit comments

Comments
 (0)