diff options
| author | Kit La Touche <kit@transneptune.net> | 2025-02-21 22:18:56 -0500 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2025-02-21 22:53:49 -0500 |
| commit | 9d1dbac74866a6175c65a25bbd8a3ccbe8cf87e4 (patch) | |
| tree | f15b3f0695b948e335774aa4d92a5b064a1c0f10 /src/token/app.rs | |
| parent | 743b59b69857da81b214970ec9252bc918ad243d (diff) | |
| parent | 36cadfe00cacc6a6523f9862d3f7a08a9d0ce611 (diff) | |
Merge branch 'main' into prop/preserve-state
Diffstat (limited to 'src/token/app.rs')
| -rw-r--r-- | src/token/app.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/token/app.rs b/src/token/app.rs index 5c0aeb0..3f054ff 100644 --- a/src/token/app.rs +++ b/src/token/app.rs @@ -1,19 +1,18 @@ use chrono::TimeDelta; use futures::{ - future, + Stream, future, stream::{self, StreamExt as _}, - Stream, }; use sqlx::sqlite::SqlitePool; use super::{ - repo::{self, auth::Provider as _, Provider as _}, Broadcaster, Event as TokenEvent, Id, Secret, + repo::{self, Provider as _, auth::Provider as _}, }; use crate::{ clock::DateTime, db::NotFound as _, - login::{repo::Provider as _, Login, Password}, + login::{Login, Password, repo::Provider as _}, name::{self, Name}, }; @@ -120,12 +119,13 @@ impl<'a> Tokens<'a> { Ok((token, login)) } - pub async fn limit_stream<E>( + pub async fn limit_stream<S, E>( &self, token: Id, - events: impl Stream<Item = E> + std::fmt::Debug, - ) -> Result<impl Stream<Item = E> + std::fmt::Debug, ValidateError> + events: S, + ) -> Result<impl Stream<Item = E> + std::fmt::Debug + use<S, E>, ValidateError> where + S: Stream<Item = E> + std::fmt::Debug, E: std::fmt::Debug, { // Subscribe, first. |
