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/).
99
1010- Added ` core::error::Error ` implementations for every custom ` impl Error `
1111- Increased MSRV to 1.81 due to ` core::error::Error `
12+ - Added ` is_extended ` default implementation for CAN frame.
1213
1314## [ v0.4.1] - 2022-09-28
1415
Original file line number Diff line number Diff line change @@ -23,7 +23,12 @@ pub trait Frame: Sized {
2323 fn new_remote ( id : impl Into < Id > , dlc : usize ) -> Option < Self > ;
2424
2525 /// 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+ }
2732
2833 /// Returns true if this frame is a standard frame.
2934 fn is_standard ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments