Skip to content

Commit f28d219

Browse files
kixelatedclaude
andcommitted
fix(mux)!: make the catalog Catalog non_exhaustive
`moq_mux::catalog::hang::Catalog<E>` is published (moq-mux 0.9.8) with all-`pub` fields and no `#[non_exhaustive]`, so adding the `json` and `binary` sections stops any downstream `Catalog { video, audio, ext }` literal from compiling. Its sibling `hang::catalog::Catalog` already carries the attribute for exactly this reason. Add it here so the break happens once rather than again on the next base section. Nothing in the workspace builds one by literal, and `Default` plus field assignment already covers every in-tree construction. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 95ed3fd commit f28d219

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • rs/moq-mux/src/catalog/hang

rs/moq-mux/src/catalog/hang/ext.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,13 @@ impl Extra {
9494
/// catalog derefs to the extension so its sections are reachable directly too (`catalog.scte35`, or
9595
/// `catalog.ext.scte35` explicitly). A consumer reading a different extension (or none) ignores
9696
/// sections it doesn't know.
97+
///
98+
/// Marked `#[non_exhaustive]` so a future base section can be added without breaking callers, which
99+
/// is what [`hang::catalog::Catalog`] already does. Build one with
100+
/// [`default`](Default::default) and set the fields you need.
97101
#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq)]
98102
#[serde(bound(serialize = "E: Serialize", deserialize = "E: DeserializeOwned"))]
103+
#[non_exhaustive]
99104
pub struct Catalog<E: CatalogExt = ()> {
100105
#[serde(default)]
101106
pub video: hang::catalog::Video,

0 commit comments

Comments
 (0)