tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.78k stars 489 forks source link

fix: fq_message_name should begin with one dot #981

Closed caspermeijn closed 6 months ago

caspermeijn commented 6 months ago

When package name is empty, but type_path is filled, the fq_message_name should begin with a single dot.

Two duplicate implementations are moved to a separate function.

A test is added that creates a sub message without a package name. The code generator uses the message name to generate a rust module path, which is invalid.

fixes: #843