formatting!

This commit is contained in:
nora 2022-03-10 19:18:26 +01:00
parent 770762b920
commit cae9683bd4
33 changed files with 147 additions and 87 deletions

View file

@ -1,15 +1,21 @@
use crate::{consumer::Consumer, methods, methods::Method, newtype_id, GlobalData, Queue};
use bytes::Bytes;
use parking_lot::Mutex;
use smallvec::SmallVec;
use std::{
collections::HashMap,
fmt::{Display, Formatter},
net::SocketAddr,
sync::Arc,
};
use bytes::Bytes;
use parking_lot::Mutex;
use smallvec::SmallVec;
use tokio::sync::mpsc;
use crate::{
consumer::Consumer,
methods::{self, Method},
newtype_id, GlobalData, Queue,
};
newtype_id!(pub ConnectionId);
newtype_id!(pub ChannelId);

View file

@ -8,19 +8,21 @@ pub mod message;
pub mod methods;
pub mod queue;
use crate::{
connection::{Channel, Connection},
queue::{Queue, QueueName},
};
use connection::{ChannelId, ConnectionId};
use parking_lot::Mutex;
use std::{
collections::HashMap,
fmt::{Debug, Formatter},
sync::Arc,
};
use connection::{ChannelId, ConnectionId};
use parking_lot::Mutex;
use uuid::Uuid;
use crate::{
connection::{Channel, Connection},
queue::{Queue, QueueName},
};
#[derive(Clone)]
pub struct GlobalData {
inner: Arc<Mutex<GlobalDataInner>>,

View file

@ -1,7 +1,9 @@
use crate::{connection::ContentHeader, newtype_id};
use std::sync::Arc;
use bytes::Bytes;
use smallvec::SmallVec;
use std::sync::Arc;
use crate::{connection::ContentHeader, newtype_id};
pub type Message = Arc<MessageInner>;

View file

@ -1,17 +1,19 @@
use crate::{
consumer::{Consumer, ConsumerId},
message::Message,
newtype, newtype_id, ChannelId,
};
use parking_lot::Mutex;
use std::{
borrow::Borrow,
collections::HashMap,
fmt::{Debug, Display, Formatter},
sync::{atomic::AtomicUsize, Arc},
};
use parking_lot::Mutex;
use tokio::sync::mpsc;
use crate::{
consumer::{Consumer, ConsumerId},
message::Message,
newtype, newtype_id, ChannelId,
};
pub type Queue = Arc<QueueInner>;
#[derive(Debug)]