File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9
9
10
10
- Added ` core::error::Error ` implementations for every custom ` impl Error `
11
11
- Increased MSRV to 1.81 due to ` core::error::Error `
12
+ - Added ` is_extended ` default implementation for CAN frame.
12
13
13
14
## [ v0.4.1] - 2022-09-28
14
15
Original file line number Diff line number Diff line change @@ -23,7 +23,12 @@ pub trait Frame: Sized {
23
23
fn new_remote ( id : impl Into < Id > , dlc : usize ) -> Option < Self > ;
24
24
25
25
/// Returns true if this frame is an extended frame.
26
- fn is_extended ( & self ) -> bool ;
26
+ fn is_extended ( & self ) -> bool {
27
+ match self . id ( ) {
28
+ Id :: Standard ( _) => false ,
29
+ Id :: Extended ( _) => true ,
30
+ }
31
+ }
27
32
28
33
/// Returns true if this frame is a standard frame.
29
34
fn is_standard ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments