feat: simplified lifetime bounds on bulk executor

This commit is contained in:
TotallyNot 2025-04-29 22:46:43 +02:00
parent c17f93f600
commit 7bc61de1c2
Signed by: pyrite
GPG key ID: 7F1BA9170CD35D15
8 changed files with 32 additions and 34 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "torn-api-codegen"
authors = ["Pyrit [2111649]"]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
description = "Contains the v2 torn API model descriptions and codegen for the bindings"
license-file = { workspace = true }

View file

@ -492,7 +492,7 @@ impl Path {
self,
ids: I,
builder: B
) -> impl futures::Stream<Item = (#disc_ty, Result<#response_ty, E::Error>)> + use<'e, E, S, I, B>
) -> impl futures::Stream<Item = (#disc_ty, Result<#response_ty, E::Error>)>
where
I: IntoIterator<Item = #disc_ty>,
S: #builder_mod_path::IsComplete,

View file

@ -65,21 +65,19 @@ impl Scope {
#(#functions)*
}
pub struct #bulk_name<'e, E> where
E: crate::executor::BulkExecutor<'e>,
pub struct #bulk_name<E> where
E: crate::executor::BulkExecutor,
{
executor: E,
marker: std::marker::PhantomData<&'e E>,
}
impl<'e, E> #bulk_name<'e, E>
impl<E> #bulk_name<E>
where
E: crate::executor::BulkExecutor<'e>
E: crate::executor::BulkExecutor
{
pub fn new(executor: E) -> Self {
Self {
executor,
marker: std::marker::PhantomData,
}
}