@@ -90,7 +90,6 @@ impl PointCloud2MessageParser {
90
90
91
91
fn builder_from_datatype ( datatype : PointFieldDatatype ) -> Box < dyn ArrayBuilder > {
92
92
match datatype {
93
- PointFieldDatatype :: Unknown => unreachable ! ( ) ,
94
93
PointFieldDatatype :: Int8 => Box :: new ( Int8Builder :: new ( ) ) ,
95
94
PointFieldDatatype :: UInt8 => Box :: new ( UInt8Builder :: new ( ) ) ,
96
95
PointFieldDatatype :: Int16 => Box :: new ( Int16Builder :: new ( ) ) ,
@@ -105,7 +104,6 @@ fn builder_from_datatype(datatype: PointFieldDatatype) -> Box<dyn ArrayBuilder>
105
104
fn access ( data : & [ u8 ] , datatype : PointFieldDatatype , is_big_endian : bool ) -> std:: io:: Result < f32 > {
106
105
let mut rdr = Cursor :: new ( data) ;
107
106
match ( is_big_endian, datatype) {
108
- ( _, PointFieldDatatype :: Unknown ) => Ok ( 0f32 ) , // Not in the original spec.
109
107
( _, PointFieldDatatype :: UInt8 ) => rdr. read_u8 ( ) . map ( |x| x as f32 ) ,
110
108
( _, PointFieldDatatype :: Int8 ) => rdr. read_i8 ( ) . map ( |x| x as f32 ) ,
111
109
( true , PointFieldDatatype :: Int16 ) => rdr. read_i16 :: < BigEndian > ( ) . map ( |x| x as f32 ) ,
@@ -126,9 +124,6 @@ fn access(data: &[u8], datatype: PointFieldDatatype, is_big_endian: bool) -> std
126
124
impl From < PointFieldDatatype > for DataType {
127
125
fn from ( value : PointFieldDatatype ) -> Self {
128
126
match value {
129
- // Not part of the MCAP spec
130
- // // https://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/PointField.html
131
- PointFieldDatatype :: Unknown => unreachable ! ( ) ,
132
127
PointFieldDatatype :: Int8 => Self :: Int8 ,
133
128
PointFieldDatatype :: UInt8 => Self :: UInt8 ,
134
129
PointFieldDatatype :: Int16 => Self :: Int16 ,
@@ -215,7 +210,6 @@ fn add_field_value(
215
210
) -> anyhow:: Result < ( ) > {
216
211
let mut rdr = Cursor :: new ( data) ;
217
212
match field. datatype {
218
- PointFieldDatatype :: Unknown => unreachable ! ( ) ,
219
213
PointFieldDatatype :: Int8 => {
220
214
let builder = builder
221
215
. as_any_mut ( )
0 commit comments