Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
  • Loading branch information
Rustin170506 committed Jul 28, 2021
1 parent cdf22d1 commit 91f0648
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/cargo/ops/cargo_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn package_one(
None
};

let ar_files = build_ar_list(&ws, pkg, src_files, vcs_info)?;
let ar_files = build_ar_list(ws, pkg, src_files, vcs_info)?;

if opts.list {
for ar_file in ar_files {
Expand Down Expand Up @@ -123,11 +123,11 @@ pub fn package_one(
.shell()
.status("Packaging", pkg.package_id().to_string())?;
dst.file().set_len(0)?;
tar(&ws, pkg, ar_files, dst.file(), &filename)
tar(ws, pkg, ar_files, dst.file(), &filename)
.with_context(|| "failed to prepare local package for uploading")?;
if opts.verify {
dst.seek(SeekFrom::Start(0))?;
run_verify(&ws, pkg, &dst, opts).with_context(|| "failed to verify package tarball")?
run_verify(ws, pkg, &dst, opts).with_context(|| "failed to verify package tarball")?
}

dst.seek(SeekFrom::Start(0))?;
Expand All @@ -149,7 +149,7 @@ pub fn package(ws: &Workspace<'_>, opts: &PackageOpts<'_>) -> CargoResult<Option

if ws.root().join("Cargo.lock").exists() {
// Make sure the Cargo.lock is up-to-date and valid.
let _ = ops::resolve_ws(&ws)?;
let _ = ops::resolve_ws(ws)?;
// If Cargo.lock does not exist, it will be generated by `build_lock`
// below, and will be validated during the verification step.
}
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/ops/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
// Prepare a tarball, with a non-suppressible warning if metadata
// is missing since this is being put online.
let tarball = ops::package_one(
&ws,
ws,
pkg,
&ops::PackageOpts {
config: opts.config,
Expand All @@ -117,7 +117,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
to_package: ops::Packages::Default,
targets: opts.targets.clone(),
jobs: opts.jobs,
cli_features: cli_features.clone(),
cli_features: cli_features,
},
)?
.unwrap();
Expand Down

0 comments on commit 91f0648

Please sign in to comment.