From 91202e92a237f70fe0b333e0b232556d894295b5 Mon Sep 17 00:00:00 2001 From: Schneems Date: Fri, 20 Dec 2024 09:47:54 -0600 Subject: [PATCH] Remove unused imports --- buildpacks/ruby/src/layers/bundle_download_layer.rs | 3 +-- buildpacks/ruby/src/layers/bundle_install_layer.rs | 5 ++--- buildpacks/ruby/src/layers/ruby_install_layer.rs | 3 +-- commons/src/layer/diff_migrate.rs | 1 - commons/src/layer/fixtures/diff_migrate_example.md | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/buildpacks/ruby/src/layers/bundle_download_layer.rs b/buildpacks/ruby/src/layers/bundle_download_layer.rs index bfcc77a..ea3e91b 100644 --- a/buildpacks/ruby/src/layers/bundle_download_layer.rs +++ b/buildpacks/ruby/src/layers/bundle_download_layer.rs @@ -17,8 +17,7 @@ use libcnb::layer::{EmptyLayerCause, LayerState}; use libcnb::layer_env::{LayerEnv, ModificationBehavior, Scope}; use libcnb::Env; use magic_migrate::{try_migrate_deserializer_chain, TryMigrate}; -use serde::{Deserialize, Deserializer, Serialize}; -use std::convert::Infallible; +use serde::{Deserialize, Serialize}; use std::io::Stdout; use std::path::Path; use std::process::Command; diff --git a/buildpacks/ruby/src/layers/bundle_install_layer.rs b/buildpacks/ruby/src/layers/bundle_install_layer.rs index c53663a..17f955a 100644 --- a/buildpacks/ruby/src/layers/bundle_install_layer.rs +++ b/buildpacks/ruby/src/layers/bundle_install_layer.rs @@ -31,8 +31,7 @@ use libcnb::{ Env, }; use magic_migrate::{try_migrate_deserializer_chain, TryMigrate}; -use serde::{Deserialize, Deserializer, Serialize}; -use std::convert::Infallible; +use serde::{Deserialize, Serialize}; use std::io::Stdout; use std::{path::Path, process::Command}; @@ -202,7 +201,7 @@ impl TryFrom for MetadataV2 { } impl TryFrom for MetadataV3 { - type Error = Infallible; + type Error = std::convert::Infallible; fn try_from(v2: MetadataV2) -> Result { Ok(Self { diff --git a/buildpacks/ruby/src/layers/ruby_install_layer.rs b/buildpacks/ruby/src/layers/ruby_install_layer.rs index 64515f9..aad8b1f 100644 --- a/buildpacks/ruby/src/layers/ruby_install_layer.rs +++ b/buildpacks/ruby/src/layers/ruby_install_layer.rs @@ -26,8 +26,7 @@ use libcnb::data::layer_name; use libcnb::layer::{EmptyLayerCause, LayerState}; use libcnb::layer_env::LayerEnv; use magic_migrate::{try_migrate_deserializer_chain, TryMigrate}; -use serde::{Deserialize, Deserializer, Serialize}; -use std::convert::Infallible; +use serde::{Deserialize, Serialize}; use std::io::{self, Stdout}; use std::path::Path; use tar::Archive; diff --git a/commons/src/layer/diff_migrate.rs b/commons/src/layer/diff_migrate.rs index a518317..6ec9c7a 100644 --- a/commons/src/layer/diff_migrate.rs +++ b/commons/src/layer/diff_migrate.rs @@ -219,7 +219,6 @@ mod tests { use libcnb::generic::{GenericMetadata, GenericPlatform}; use libcnb::layer::{EmptyLayerCause, InvalidMetadataAction, LayerState, RestoredLayerAction}; use magic_migrate::{migrate_toml_chain, try_migrate_deserializer_chain, Migrate, TryMigrate}; - use serde::Deserializer; use std::convert::Infallible; /// Struct for asserting the behavior of `CacheBuddy` #[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] diff --git a/commons/src/layer/fixtures/diff_migrate_example.md b/commons/src/layer/fixtures/diff_migrate_example.md index afecae4..6d49ca1 100644 --- a/commons/src/layer/fixtures/diff_migrate_example.md +++ b/commons/src/layer/fixtures/diff_migrate_example.md @@ -4,7 +4,6 @@ use commons::layer::diff_migrate::{DiffMigrateLayer, Meta}; use cache_diff::CacheDiff; use magic_migrate::TryMigrate; -use serde::Deserializer; use libcnb::layer::{LayerState, EmptyLayerCause}; use libcnb::data::layer_name;