From 99844e6c49d9c3195a32f239c027a48412c92252 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 30 Jul 2024 09:57:45 -0400 Subject: Reduce unused generality --- src/apply.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/apply.rs b/src/apply.rs index 48cc1bf..ee1824e 100644 --- a/src/apply.rs +++ b/src/apply.rs @@ -13,17 +13,16 @@ pub enum ApplyMode { } impl ApplyMode { - pub async fn apply( + pub async fn apply( &self, aws_context: &C, zone_id: &str, remove_records: R, - insert_records: I, + insert_records: R, ) -> Result<()> where C: Route53, R: IntoIterator + Debug, - I: IntoIterator + Debug, { match self { ApplyMode::DryRun => dry_run(zone_id, remove_records, insert_records).await, @@ -32,10 +31,9 @@ impl ApplyMode { } } -async fn dry_run(zone_id: &str, remove_records: R, insert_records: I) -> Result<()> +async fn dry_run(zone_id: &str, remove_records: R, insert_records: R) -> Result<()> where R: IntoIterator + Debug, - I: IntoIterator + Debug, { println!("ZONE: {}", zone_id); println!("REMOVE: {:#?}", remove_records); @@ -44,16 +42,15 @@ where Ok(()) } -async fn apply( +async fn apply( aws_context: &C, zone_id: &str, remove_records: R, - insert_records: I, + insert_records: R, ) -> Result<()> where C: Route53, R: IntoIterator, - I: IntoIterator, { let remove_records = remove_records.into_iter().map(|record| { Change::builder() -- cgit v1.2.3