cargo fix
This commit is contained in:
@@ -16,6 +16,7 @@ use crate::{
|
||||
|
||||
use futures_util::stream::BoxStream;
|
||||
use futures_util::StreamExt;
|
||||
use bytes::Bytes;
|
||||
|
||||
pub struct TestClient {
|
||||
pub version: &'static str,
|
||||
@@ -67,6 +68,7 @@ impl EventSocket for TestEventSocket {
|
||||
#[async_trait]
|
||||
impl APIInterface for TestClient {
|
||||
type Error = TestError;
|
||||
type ResponseStream = BoxStream<'static, Result<Bytes, TestError>>;
|
||||
|
||||
async fn authenticate(&mut self, _credentials: Credentials) -> Result<JwtToken, Self::Error> {
|
||||
Ok(JwtToken::dummy())
|
||||
@@ -118,7 +120,7 @@ impl APIInterface for TestClient {
|
||||
Ok(TestEventSocket::new())
|
||||
}
|
||||
|
||||
async fn fetch_attachment_data(&mut self, guid: &String) -> Result<Vec<u8>, Self::Error> {
|
||||
Ok(vec![])
|
||||
async fn fetch_attachment_data(&mut self, guid: &String, preview: bool) -> Result<Self::ResponseStream, Self::Error> {
|
||||
Ok(futures_util::stream::iter(vec![Ok(Bytes::from_static(b"test"))]).boxed())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user