Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 7bd61d9

Browse files
committed
feat: remove errors crate
1 parent da08ac9 commit 7bd61d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+103
-180
lines changed

Cargo.lock

Lines changed: 38 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
members = [
44
"amqp",
55
"env",
6-
"errors",
76
"health_readiness",
87
"httpw",
98
"logging",

amqp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2021"
77
mocks = ["dep:mockall"]
88

99
[dependencies]
10-
errors = { path = "../errors" }
1110
env = { path = "../env" }
1211
traces = { path = "../traces" }
1312

@@ -20,6 +19,7 @@ serde_json = { version = "1.0.91" }
2019
serde = { version = "1.0.152", features = ["derive"] }
2120
tokio = { version = "1.25.0", features = ["default"] }
2221
futures-util = { version = "0.3.26"}
22+
thiserror = { version = "1.0.38" }
2323

2424
# Used only with feature mock
2525
mockall = { version = "0.11.3", optional = true }

amqp/src/client.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
use crate::types::PublishParams;
2-
31
use super::{
42
defs,
53
topology::ExchangeKind as MyExchangeKind,
64
types::{AmqpPayload, AmqpTracePropagator},
75
};
6+
use crate::{errors::AmqpError, types::PublishParams};
87
use async_trait::async_trait;
98
use env::{Configs, DynamicConfig};
10-
use errors::amqp::AmqpError;
119
use lapin::{
1210
message::BasicGetMessage,
1311
options::{

amqp/src/consumer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::{
22
client::Amqp,
3+
errors::AmqpError,
34
topology::{ConsumerHandler, QueueDefinition},
45
types::{new_span, Metadata},
56
};
6-
use errors::amqp::AmqpError;
77
use lapin::{
88
message::Delivery,
99
options::{BasicAckOptions, BasicNackOptions, BasicPublishOptions},

amqp/src/dispatcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::{
22
client::Amqp,
33
consumer::consume,
4+
errors::AmqpError,
45
topology::{ConsumerHandler, QueueDefinition},
56
};
6-
use errors::amqp::AmqpError;
77
use futures_util::{future::join_all, StreamExt};
88
use opentelemetry::global;
99
use std::sync::Arc;
File renamed without changes.

amqp/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ mod consumer;
33
pub mod client;
44
pub mod defs;
55
pub mod dispatcher;
6+
pub mod errors;
67
#[cfg(test)]
78
pub mod mocks;
89
#[cfg(feature = "mocks")]

amqp/src/mocks.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ use super::{
22
topology::ExchangeKind as MyExchangeKind,
33
types::{AmqpPayload, PublishParams},
44
};
5-
use crate::client::Amqp;
5+
use crate::{client::Amqp, errors::AmqpError};
66
use async_trait::async_trait;
7-
use errors::amqp::AmqpError;
87
use lapin::{
98
message::BasicGetMessage,
109
types::{AMQPValue, FieldTable, ShortString},

amqp/src/topology.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use std::{collections::BTreeMap, sync::Arc};
2-
3-
use crate::{client::Amqp, defs};
1+
use crate::{client::Amqp, defs, errors::AmqpError};
42
use async_trait::async_trait;
5-
use errors::amqp::AmqpError;
63
use lapin::types::{AMQPValue, FieldTable, LongInt, LongString, ShortString};
74
use opentelemetry::Context;
5+
use std::{collections::BTreeMap, sync::Arc};
86
use tracing::debug;
97

108
#[derive(Debug, Clone, Default)]

0 commit comments

Comments
 (0)