docs(pnpr): fix dangling intra-doc links to removed build_files_payload

The streaming refactor deleted `build_files_payload`, but two doc
comments (`INLINE_CONTENT_TYPE`, `finish_inline_response`) still linked
to it. The CI Doc job runs `cargo doc --document-private-items`, which
resolves intra-doc links to private items and rejects the dangling
references under `-D warnings`; the pre-push hook omits that flag, so it
passed locally. Reword both to describe the framing directly.
This commit is contained in:
Zoltan Kochan
2026-06-05 15:47:44 +02:00
parent ed3b854afa
commit 80114b60ea

View File

@@ -536,7 +536,7 @@ fn package_name(pkg_id: &str) -> Option<&str> {
const FILES_GZIP_LEVEL: u32 = 6;
/// Content type of the install response: a length-prefixed JSON header
/// followed by the [`build_files_payload`] binary frames, gzip-compressed.
/// followed by the binary file frames, gzip-compressed.
const INLINE_CONTENT_TYPE: &str = "application/x-pnpr-install-inline";
/// Build the single-response body: the lockfile, stats, and store-index
@@ -700,8 +700,11 @@ impl std::io::Write for ChannelWriter {
}
}
/// Frame a JSON `header` and an already-built [`build_files_payload`]
/// byte buffer into one length-prefixed, gzip-compressed body.
/// Frame a JSON `header` and an already-built files-payload byte buffer
/// (see [`empty_files_payload`]) into one length-prefixed, gzip-compressed
/// body. The streaming success path emits the same framing incrementally
/// in [`stream_install_body`]; this buffered form serves the small
/// metadata-only responses ([`violation_response`]).
fn finish_inline_response(header: &serde_json::Value, files_payload: &[u8]) -> Response {
let header_bytes = serde_json::to_vec(header).unwrap_or_else(|_| b"{}".to_vec());
let Ok(header_len) = u32::try_from(header_bytes.len()) else {