From e42b9526490c298d570f3241acb71b011ddfc211 Mon Sep 17 00:00:00 2001 From: Xerxes-2 Date: Tue, 19 Aug 2025 16:56:07 +1000 Subject: [PATCH] refactor: update file handling in write_validated_key_to_tier_files to use AsyncWrite trait --- src/adapters/output/local.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/adapters/output/local.rs b/src/adapters/output/local.rs index 2edb694..747ade6 100644 --- a/src/adapters/output/local.rs +++ b/src/adapters/output/local.rs @@ -1,14 +1,14 @@ use crate::error::ValidatorError; use crate::types::{GeminiKey, KeyTier, ValidatedKey}; use std::{fs, io::Write}; -use tokio::io::{AsyncWriteExt, BufWriter}; +use tokio::io::{AsyncWrite, AsyncWriteExt}; use toml::Value; use tracing::info; // Write valid key to appropriate tier file pub async fn write_validated_key_to_tier_files( - free_file: &mut BufWriter, - paid_file: &mut BufWriter, + free_file: &mut (impl AsyncWrite + Unpin), + paid_file: &mut (impl AsyncWrite + Unpin), validated_key: &ValidatedKey, ) -> Result<(), ValidatorError> { match validated_key.tier {