diff options
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. |
