Skip to content

docs(rs): create_track examples handle the Option it returns - #9208

Merged
kixelated merged 1 commit into
mainfrom
fix/doctest-create-track
Nov 19, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/doctest-create-track

Conversation

@kixelated

@kixelated kixelated commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

moq-dev/moq#9150 made broadcast::Producer::create_track return None while a live track holds the name, but three doc examples still applied ? to it, so their doctests stopped compiling: moq_net::origin::Route (rs/moq-net/src/model/origin.rs), moq_mux::json (rs/moq-mux/src/json.rs), and the telemetry example in rs/moq-mux/src/catalog/tracks.rs. Each now turns None into moq_net::Error::Duplicate.

Doctests run only in Nightly's rs doctest --workspace row, and #9150 landed after the 2026-11-19 Nightly started, so this fixes the next Nightly before it fails.

Validation

  • cargo test --workspace --doc --all-features passes; on main, the three examples fail with the ? operator can only be used on Results, not Options.

Caused by

  • moq-dev/moq#9150 - made create_track return an Option without updating its doc examples

Impact

Docs only. Public API: none. Wire: none.

Models

Size: XS
Implementer: Claude Code, claude-opus-5-5, high effort

(Written by Claude Opus 5.5 with high)

🤖 Generated with Claude Code

Review

Skipped: a three-line doc example change with no behavior; the workspace doctests compiling and passing is the whole check.

#9150 made broadcast::Producer::create_track return None for a taken
name, but three doc examples still applied ? to it, so their doctests
no longer compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d80f7061-16f4-43e6-b272-43dad951c556
Commits

Reviewing files that changed from the base of the PR and between 2bdbb6e and 5e70f9b.

Files selected for processing: 3

  • rs/moq-mux/src/catalog/tracks.rs
  • rs/moq-mux/src/json.rs
  • rs/moq-net/src/model/origin.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated
kixelated enabled auto-merge November 19, 2026 21:27

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Doc examples in rs/moq-mux/src/catalog/tracks.rs, rs/moq-mux/src/json.rs and rs/moq-net/src/model/origin.rs now map the Option from create_track to moq_net::Error::Duplicate instead of applying ? to it. Error::Duplicate exists in rs/moq-net/src/error.rs.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 0b70a3e Nov 19, 2026
7 checks passed
@kixelated
kixelated deleted the fix/doctest-create-track branch November 19, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant