diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c8cd29..eaf2eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.6.3 - 2024-05-27 +### Changed +- Accept connection records without `topic` field ([#6]) + +[#6]: https://github.com/newpavlov/rosbag-rs/pull/6 + ## 0.6.2 - 2024-05-22 ### Changed - Accept empty `latching` field in connection headers ([#5]) diff --git a/Cargo.toml b/Cargo.toml index 3e2ad54..b7e1a80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rosbag" -version = "0.6.2" +version = "0.6.3" description = "Utilities for reading ROS bag files." authors = ["Artyom Pavlov "] license = "MIT OR Apache-2.0" diff --git a/src/record_types/connection.rs b/src/record_types/connection.rs index 163c839..1300d1a 100644 --- a/src/record_types/connection.rs +++ b/src/record_types/connection.rs @@ -85,7 +85,7 @@ impl<'a> RecordGen<'a> for Connection<'a> { } } - let topic = topic.ok_or(Error::InvalidHeader)?; + let topic = topic.unwrap_or(storage_topic); let tp = tp.ok_or(Error::InvalidHeader)?; let md5sum = md5sum.ok_or(Error::InvalidHeader)?; let message_definition = message_definition.ok_or(Error::InvalidHeader)?;