Skip to content

Commit

Permalink
Allow clippy::identity_conversion due to clippy bug
Browse files Browse the repository at this point in the history
This only needs to be overridden in a few places, so we do that rather
than remove the lint entirely. These overrides can be removed once
rust-lang/rust-clippy#4133 is resolved

Signed-off-by: Jon Bauman <5906042+baumanj@users.noreply.github.com>
  • Loading branch information
baumanj committed May 24, 2019
1 parent 3552e74 commit 8667429
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/core/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ pub fn find_command_in_pkg<T, U>(command: T,
where T: AsRef<Path>,
U: AsRef<Path>
{
// Remove this once https://github.com/rust-lang/rust-clippy/issues/4133 is resolved
#[allow(clippy::identity_conversion)]
for path in pkg_install.paths()? {
let stripped =
path.strip_prefix("/")
Expand Down
4 changes: 4 additions & 0 deletions components/core/src/package/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ impl PackageInstall {
let mut paths = Vec::new();
let mut seen = HashSet::new();

// Remove this once https://github.com/rust-lang/rust-clippy/issues/4133 is resolved
#[allow(clippy::identity_conversion)]
for p in self.paths()? {
if seen.contains(&p) {
continue;
Expand All @@ -513,6 +515,8 @@ impl PackageInstall {
.into_iter()
.chain(self.load_tdeps()?.into_iter());
for pkg in ordered_pkgs {
// Remove this once https://github.com/rust-lang/rust-clippy/issues/4133 is resolved
#[allow(clippy::identity_conversion)]
for p in pkg.paths()? {
if seen.contains(&p) {
continue;
Expand Down

0 comments on commit 8667429

Please sign in to comment.