use torn-api 0.6 for the key pool

This commit is contained in:
TotallyNot 2023-11-20 13:17:26 +01:00
parent fee278e895
commit af39b03ef2
3 changed files with 16 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "torn-key-pool"
version = "0.6.2"
version = "0.7.0"
edition = "2021"
authors = ["Pyrit [2111649]"]
license = "MIT"

View file

@ -29,6 +29,20 @@ where
Response(ResponseError),
}
impl<S, C> KeyPoolError<S, C>
where
S: std::error::Error,
C: std::error::Error,
{
#[inline(always)]
pub fn api_code(&self) -> Option<u8> {
match self {
Self::Response(why) => why.api_code(),
_ => None,
}
}
}
pub trait ApiKey: Sync + Send + std::fmt::Debug + Clone {
type IdType: PartialEq + Eq + std::hash::Hash + Send + Sync + std::fmt::Debug + Clone;

View file

@ -1,4 +1,4 @@
use async_trait::async_trait;
use indoc::indoc;
use sqlx::{FromRow, PgPool, Postgres, QueryBuilder};
use thiserror::Error;