Private
Public Access
1
0

cargo fix

This commit is contained in:
2025-06-06 16:35:51 -07:00
parent 9e8c976a0e
commit 8cd72d9417
8 changed files with 8 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ use tokio::net::TcpStream;
use futures_util::stream::{BoxStream, Stream};
use futures_util::task::Context;
use futures_util::{SinkExt, StreamExt, TryStreamExt};
use futures_util::{StreamExt, TryStreamExt};
use tokio_tungstenite::connect_async;
use tokio_tungstenite::{MaybeTlsStream, WebSocketStream};

View File

@@ -16,8 +16,7 @@ pub mod event_socket;
pub use event_socket::EventSocket;
use self::http_client::Credentials;
use core::error::Error as StdError;
use std::{fmt::Debug, io::BufRead};
use std::fmt::Debug;
#[async_trait]
pub trait APIInterface {

View File

@@ -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())
}
}

View File

@@ -9,7 +9,6 @@ use kordophone::APIInterface;
use thiserror::Error;
use kordophone_db::database::Database;
use kordophone_db::database::DatabaseAccess;
use crate::daemon::events::Event;
use crate::daemon::events::Reply;
@@ -21,7 +20,6 @@ use tokio::sync::Mutex;
use tokio::sync::mpsc::{Receiver, Sender};
use tokio::pin;
use tokio::time::Duration;
mod target {
pub static ATTACHMENTS: &str = "attachments";

View File

@@ -5,7 +5,6 @@ use std::sync::Arc;
use tokio::sync::Mutex;
use kordophone::api::{http_client::Credentials, AuthenticationStore};
use kordophone::model::JwtToken;
use kordophone_db::database::{Database, DatabaseAccess};
use async_trait::async_trait;

View File

@@ -13,7 +13,7 @@ use directories::ProjectDirs;
use std::collections::HashMap;
use std::error::Error;
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use std::sync::Arc;
use thiserror::Error;

View File

@@ -2,7 +2,6 @@ use chrono::NaiveDateTime;
use chrono::DateTime;
use std::collections::HashMap;
use uuid::Uuid;
use kordophone::model::message::AttachmentMetadata;
use kordophone::model::outgoing_message::OutgoingMessage;
use crate::daemon::models::Attachment;

View File

@@ -7,8 +7,7 @@ use tokio::sync::oneshot;
use crate::daemon::{
events::{Event, Reply},
settings::Settings,
Attachment, DaemonResult,
settings::Settings, DaemonResult,
};
use crate::dbus::interface::NetBuzzertKordophoneRepository as DbusRepository;