Skip to content

Commit

Permalink
Auto merge of #13678 - heisen-li:flag_allow_prerelease, r=epage
Browse files Browse the repository at this point in the history
Remove useless parameters

### What does this PR try to resolve?

From #12078 (comment)
  • Loading branch information
bors committed Apr 1, 2024
2 parents 50efee4 + 7fa0e81 commit 01270e0
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/cargo/ops/cargo_add/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,8 @@ fn resolve_dependency(
}
dependency = dependency.set_source(src);
} else {
let latest = get_latest_dependency(
spec,
&dependency,
false,
honor_rust_version,
gctx,
registry,
)?;
let latest =
get_latest_dependency(spec, &dependency, honor_rust_version, gctx, registry)?;

if dependency.name != latest.name {
gctx.shell().warn(format!(
Expand Down Expand Up @@ -577,7 +571,6 @@ fn get_existing_dependency(
fn get_latest_dependency(
spec: &Package,
dependency: &Dependency,
_flag_allow_prerelease: bool,
honor_rust_version: bool,
gctx: &GlobalContext,
registry: &mut PackageRegistry<'_>,
Expand Down

0 comments on commit 01270e0

Please sign in to comment.