Skip to content

Commit 867ff6b

Browse files
authored
Merge pull request #53 from diseraluca/issue_27/configuring_lint_levels
Issue 27/configuring lint levels
2 parents 966b3a7 + 001dc0f commit 867ff6b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![allow(incomplete_features)]
2+
#![deny(noop_method_call, single_use_lifetimes, unreachable_pub, unsafe_code, unsafe_op_in_unsafe_fn, unused_import_braces, unused_lifetimes, warnings)]
3+
14
#![no_std]
25
#![feature(cfg_eval)]
36

@@ -38,7 +41,7 @@ mod tests {
3841
use std::format;
3942

4043
#[derive(Debug)]
41-
pub struct ClassicFrame {
44+
pub(super) struct ClassicFrame {
4245
data: [u8; 8],
4346
id: u32,
4447
len: usize,
@@ -60,23 +63,22 @@ mod tests {
6063
}
6164
}
6265

63-
pub struct TxRxGlue<
66+
pub(super) struct TxRxGlue<
6467
'a,
6568
Frame: CanFrame<MTU>,
6669
Capacity: ArrayLength<Transfer<TransferCapacity>>,
6770
TransferCapacity: ArrayLength<u8>,
6871
const MTU: usize,
6972
> {
70-
pub rx_producer: RxProducer<'a, Frame, Capacity, TransferCapacity, MTU>,
73+
pub(super) rx_producer: RxProducer<'a, Frame, Capacity, TransferCapacity, MTU>,
7174
}
7275

7376
impl<
74-
'a,
7577
Frame: CanFrame<MTU>,
7678
Capacity: ArrayLength<Transfer<TransferCapacity>>,
7779
TransferCapacity: ArrayLength<u8>,
7880
const MTU: usize,
79-
> CanWriter<Frame, MTU> for TxRxGlue<'a, Frame, Capacity, TransferCapacity, MTU>
81+
> CanWriter<Frame, MTU> for TxRxGlue<'_, Frame, Capacity, TransferCapacity, MTU>
8082
{
8183
type Error = RxError<Frame, MTU>;
8284

src/rx/rx_network.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,11 @@ impl<
8282
}
8383

8484
impl<
85-
'a,
8685
Frame: CanFrame<MTU>,
8786
Capacity: ArrayLength<Transfer<TransferCapacity>>,
8887
TransferCapacity: ArrayLength<u8>,
8988
const MTU: usize,
90-
> Iterator for RxConsumer<'a, Frame, Capacity, TransferCapacity, MTU>
89+
> Iterator for RxConsumer<'_, Frame, Capacity, TransferCapacity, MTU>
9190
{
9291
type Item = Transfer<TransferCapacity>;
9392

@@ -97,12 +96,11 @@ impl<
9796
}
9897

9998
impl<
100-
'a,
10199
Frame: CanFrame<MTU>,
102100
Capacity: ArrayLength<Transfer<TransferCapacity>>,
103101
TransferCapacity: ArrayLength<u8>,
104102
const MTU: usize,
105-
> RxProducer<'a, Frame, Capacity, TransferCapacity, MTU>
103+
> RxProducer<'_, Frame, Capacity, TransferCapacity, MTU>
106104
{
107105
pub fn receive(&mut self, frame: Frame) -> Result<(), RxError<Frame, MTU>> {
108106
// println!("Received frame {:?}", frame);

src/tx/breakdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl<'a, Frame: CanFrame<MTU>, const MTU: usize> Breakdown<'a, Frame, MTU> {
260260
}
261261
}
262262

263-
impl<'a, Frame: CanFrame<MTU>, const MTU: usize> Iterator for Breakdown<'a, Frame, MTU> {
263+
impl<Frame: CanFrame<MTU>, const MTU: usize> Iterator for Breakdown<'_, Frame, MTU> {
264264
type Item = Frame;
265265

266266
fn next(&mut self) -> Option<Self::Item> {

0 commit comments

Comments
 (0)