Rename to SourceDistributionBuilder (#2750)

## Summary

This is more consistent with `DistributionDatabase`. The order of the
arguments is also now consistent between the two structs.
This commit is contained in:
Charlie Marsh 2024-03-31 22:37:43 -04:00 committed by GitHub
parent 8596ff3470
commit e68cdb1049
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 19 deletions

View file

@ -44,9 +44,9 @@ mod built_wheel_metadata;
mod manifest;
/// Fetch and build a source distribution from a remote source, or from a local cache.
pub struct SourceDistCachedBuilder<'a, T: BuildContext> {
build_context: &'a T,
pub struct SourceDistributionBuilder<'a, T: BuildContext> {
client: &'a RegistryClient,
build_context: &'a T,
reporter: Option<Arc<dyn Reporter>>,
}
@ -56,13 +56,13 @@ pub(crate) const MANIFEST: &str = "manifest.msgpack";
/// The name of the file that contains the cached distribution metadata, encoded via `MsgPack`.
pub(crate) const METADATA: &str = "metadata.msgpack";
impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> {
/// Initialize a [`SourceDistCachedBuilder`] from a [`BuildContext`].
pub fn new(build_context: &'a T, client: &'a RegistryClient) -> Self {
impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
/// Initialize a [`SourceDistributionBuilder`] from a [`BuildContext`].
pub fn new(client: &'a RegistryClient, build_context: &'a T) -> Self {
Self {
client,
build_context,
reporter: None,
client,
}
}