Skip to content

Commit

Permalink
move DeliveryTag definition
Browse files Browse the repository at this point in the history
Signed-off-by: Marc-Antoine Perennou <[email protected]>
  • Loading branch information
Keruspe committed Nov 21, 2020
1 parent bc7c5f3 commit b983d77
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/acker.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{
acknowledgement::DeliveryTag,
internal_rpc::InternalRPCHandle,
options::{BasicAckOptions, BasicNackOptions, BasicRejectOptions},
Promise, PromiseResolver, Result,
DeliveryTag, Promise, PromiseResolver, Result,
};

#[derive(Default, Debug, Clone)]
Expand Down
4 changes: 1 addition & 3 deletions src/acknowledgement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
protocol::{AMQPError, AMQPSoftError},
publisher_confirm::{Confirmation, PublisherConfirm},
returned_messages::ReturnedMessages,
ConfirmationBroadcaster, Error, Promise,
ConfirmationBroadcaster, DeliveryTag, Error, Promise,
};
use parking_lot::Mutex;
use std::{
Expand All @@ -11,8 +11,6 @@ use std::{
sync::Arc,
};

pub type DeliveryTag = u64;

#[derive(Clone)]
pub(crate) struct Acknowledgements(Arc<Mutex<Inner>>);

Expand Down
6 changes: 3 additions & 3 deletions src/channel.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
acknowledgement::{Acknowledgements, DeliveryTag},
acknowledgement::Acknowledgements,
auth::Credentials,
basic_get_delivery::BasicGetDelivery,
channel_closer::ChannelCloser,
Expand All @@ -23,8 +23,8 @@ use crate::{
topology::RestoredChannel,
topology_internal::ChannelDefinitionInternal,
types::*,
BasicProperties, Configuration, ConfirmationPromise, Connection, ConnectionStatus, Error,
ExchangeKind, Promise, PromiseChain, PromiseResolver, Result,
BasicProperties, Configuration, ConfirmationPromise, Connection, ConnectionStatus, DeliveryTag,
Error, ExchangeKind, Promise, PromiseChain, PromiseResolver, Result,
};
use amq_protocol::frame::{AMQPContentHeader, AMQPFrame};
use log::{debug, error, info, log_enabled, trace, Level::Trace};
Expand Down
3 changes: 1 addition & 2 deletions src/internal_rpc.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use crate::{
acknowledgement::DeliveryTag,
channels::Channels,
executor::Executor,
options::{BasicAckOptions, BasicCancelOptions, BasicNackOptions, BasicRejectOptions},
socket_state::SocketStateHandle,
types::ShortUInt,
Error, PromiseResolver, Result,
DeliveryTag, Error, PromiseResolver, Result,
};
use crossbeam_channel::{Receiver, Sender};
use log::trace;
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ pub mod reactor;
pub mod socket_state;
pub mod topology;

pub type DeliveryTag = u64;

pub type Promise<T> = pinky_swear::PinkySwear<Result<T>>;
pub type PromiseChain<T> = pinky_swear::PinkySwear<Result<T>, Result<()>>;
pub type ConfirmationPromise<T> =
Expand Down

0 comments on commit b983d77

Please sign in to comment.