Skip to content

Commit 7959cf3

Browse files
authored
feat: Add Send + Sync trait bounds to error types in flagd RpcResolver (#46)
Signed-off-by: biwecka <[email protected]>
1 parent b24b54d commit 7959cf3

File tree

1 file changed

+4
-2
lines changed
  • crates/flagd/src/resolver

1 file changed

+4
-2
lines changed

crates/flagd/src/resolver/rpc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ pub struct RpcResolver {
9292

9393
impl RpcResolver {
9494
#[instrument(skip(options))]
95-
pub async fn new(options: &FlagdOptions) -> Result<Self, Box<dyn std::error::Error>> {
95+
pub async fn new(
96+
options: &FlagdOptions,
97+
) -> Result<Self, Box<dyn std::error::Error + Send + Sync>> {
9698
debug!("initializing RPC resolver connection to {}", options.host);
9799

98100
let mut retry_delay = Duration::from_millis(options.retry_backoff_ms as u64);
@@ -131,7 +133,7 @@ impl RpcResolver {
131133

132134
async fn establish_connection(
133135
options: &FlagdOptions,
134-
) -> Result<ClientType, Box<dyn std::error::Error>> {
136+
) -> Result<ClientType, Box<dyn std::error::Error + Send + Sync>> {
135137
if let Some(socket_path) = &options.socket_path {
136138
debug!("Attempting Unix socket connection to: {}", socket_path);
137139
let socket_path = socket_path.clone();

0 commit comments

Comments
 (0)