Skip to content

Commit dac3a43

Browse files
committed
rename Builder, refactor patch_with_git args
1 parent e5e5592 commit dac3a43

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/build.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ pub struct BuildDirectory {
2424
}
2525

2626
/// Builder for configuring builds in a [`BuildDirectory`](struct.BuildDirectory.html).
27-
pub struct Builder<'a> {
27+
pub struct BuildBuilder<'a> {
2828
build_dir: &'a mut BuildDirectory,
2929
toolchain: &'a Toolchain,
3030
krate: &'a Crate,
3131
sandbox: SandboxBuilder,
3232
patches: Vec<CratePatch>,
3333
}
3434

35-
impl<'a> Builder<'a> {
35+
impl<'a> BuildBuilder<'a> {
3636
/// Add a patch to this build.
3737
/// Patches get added to the crate's Cargo.toml in the `patch.crates-io` table.
3838
/// # Example
@@ -54,8 +54,8 @@ impl<'a> Builder<'a> {
5454
/// })?;
5555
/// # Ok(())
5656
/// # }
57-
pub fn patch_with_git(mut self, name: String, uri: String, branch: String) -> Self {
58-
self.patches.push(CratePatch { name, uri, branch });
57+
pub fn patch_with_git(mut self, name: &str, uri: &str, branch: &str) -> Self {
58+
self.patches.push(CratePatch { name: name.into(), uri: uri.into(), branch: branch.into() });
5959
self
6060
}
6161

@@ -122,8 +122,8 @@ impl BuildDirectory {
122122
toolchain: &'a Toolchain,
123123
krate: &'a Crate,
124124
sandbox: SandboxBuilder,
125-
) -> Builder {
126-
Builder {
125+
) -> BuildBuilder {
126+
BuildBuilder {
127127
build_dir: self,
128128
toolchain,
129129
krate,

0 commit comments

Comments
 (0)