Avoid eager copies of plugin startup HTTP response bodies (#63241)

## What changed

Convert response bodies with `Vec::from` in both GitHub and public fetches so the conversion can reuse the backing allocation when possible.

GitOrigin-RevId: ece0f018a08706a99b80733ec6c916ed39df5213
This commit is contained in:
Charlie Marsh
2026-11-23 02:37:09 +00:00
committed by copyberry
parent f1fd6c4c35
commit e0a6d0532d
+2 -2
View File
@@ -960,7 +960,7 @@ async fn fetch_github_bytes(
"{context} from {url} failed with status {status}: {body_text}"
));
}
Ok(body.to_vec())
Ok(Vec::from(body))
}
async fn fetch_public_text(
@@ -1007,7 +1007,7 @@ async fn fetch_public_bytes(
"{context} from {url} failed with status {status}: {body_text}"
));
}
Ok(body.to_vec())
Ok(Vec::from(body))
}
fn github_request(http_clients: &StartupSyncHttpClient, url: &str) -> RequestBuilder {