Skip to content

Commit

Permalink
Simplify signature of new_with_data_size
Browse files Browse the repository at this point in the history
There's no need for a separate DATA_SIZE generic parameter
  • Loading branch information
jannic committed Nov 1, 2023
1 parent 01317ee commit 646e600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rp2040-hal/src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<D: SpiDevice, P: ValidSpiPinout<D>, const DS: u8> Spi<Disabled, D, P, DS> {
///
/// Initialize it with [`.init`][Self::init]
/// or [`.init_slave`][Self::init_slave].
pub fn new_with_data_size<const DATA_SIZE: u8>(device: D, pins: P) -> Spi<Disabled, D, P, DATA_SIZE> {
pub fn new_with_data_size(device: D, pins: P) -> Spi<Disabled, D, P, DS> {
Spi {
device,
pins,
Expand Down

0 comments on commit 646e600

Please sign in to comment.