Skip to content

Commit bf78087

Browse files
committed
publish: Remove dsl::* import
This creates too many variables in the function with ambiguous names...
1 parent 7e95789 commit bf78087

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/controllers/krate/publish.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ pub fn add_dependencies(
435435
deps: &[EncodableCrateDependency],
436436
target_version_id: i32,
437437
) -> AppResult<()> {
438-
use self::dependencies::dsl::*;
439438
use diesel::insert_into;
440439

441440
let crate_ids = crates::table
@@ -468,20 +467,20 @@ pub fn add_dependencies(
468467
}
469468

470469
Ok((
471-
version_id.eq(target_version_id),
472-
crate_id.eq(krate_id),
473-
req.eq(dep.version_req.to_string()),
474-
dep.kind.map(|k| kind.eq(k)),
475-
optional.eq(dep.optional),
476-
default_features.eq(dep.default_features),
477-
features.eq(&dep.features),
478-
target.eq(dep.target.as_deref()),
479-
explicit_name.eq(dep.explicit_name_in_toml.as_deref())
470+
dependencies::version_id.eq(target_version_id),
471+
dependencies::crate_id.eq(krate_id),
472+
dependencies::req.eq(dep.version_req.to_string()),
473+
dep.kind.map(|k| dependencies::kind.eq(k)),
474+
dependencies::optional.eq(dep.optional),
475+
dependencies::default_features.eq(dep.default_features),
476+
dependencies::features.eq(&dep.features),
477+
dependencies::target.eq(dep.target.as_deref()),
478+
dependencies::explicit_name.eq(dep.explicit_name_in_toml.as_deref())
480479
))
481480
})
482481
.collect::<Result<Vec<_>, _>>()?;
483482

484-
insert_into(dependencies)
483+
insert_into(dependencies::table)
485484
.values(&new_dependencies)
486485
.execute(conn)?;
487486

0 commit comments

Comments
 (0)