Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions launchdarkly-server-sdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@ impl Client {
}

let initialized = tokio::time::timeout(timeout, self.initialized_async_internal()).await;
match initialized {
Ok(result) => Some(result),
Err(_) => None,
}
initialized.ok()
}

async fn initialized_async_internal(&self) -> bool {
Expand Down
6 changes: 3 additions & 3 deletions launchdarkly-server-sdk/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ impl Config {
}

/// Returns the DataStoreFactory
pub fn data_store_builder(&self) -> &(dyn DataStoreFactory) {
pub fn data_store_builder(&self) -> &dyn DataStoreFactory {
self.data_store_builder.borrow()
}

/// Returns the DataSourceFactory
pub fn data_source_builder(&self) -> &(dyn DataSourceFactory) {
pub fn data_source_builder(&self) -> &dyn DataSourceFactory {
self.data_source_builder.borrow()
}

/// Returns the EventProcessorFactory
pub fn event_processor_builder(&self) -> &(dyn EventProcessorFactory) {
pub fn event_processor_builder(&self) -> &dyn EventProcessorFactory {
self.event_processor_builder.borrow()
}

Expand Down
1 change: 1 addition & 0 deletions launchdarkly-server-sdk/src/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pub struct StreamingDataSource {
}

impl StreamingDataSource {
#[allow(clippy::result_large_err)]
pub fn new<C>(
base_url: &str,
sdk_key: &str,
Expand Down
4 changes: 2 additions & 2 deletions launchdarkly-server-sdk/src/events/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub trait EventSender: Send + Sync {
&self,
events: Vec<OutputEvent>,
result_tx: Sender<EventSenderResult>,
) -> BoxFuture<()>;
) -> BoxFuture<'_, ()>;
}

#[derive(Clone)]
Expand Down Expand Up @@ -99,7 +99,7 @@ where
&self,
events: Vec<OutputEvent>,
result_tx: Sender<EventSenderResult>,
) -> BoxFuture<()> {
) -> BoxFuture<'_, ()> {
Box::pin(async move {
let uuid = Uuid::new_v4();

Expand Down
4 changes: 2 additions & 2 deletions launchdarkly-server-sdk/src/feature_requester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub enum FeatureRequesterError {
struct CachedEntry(AllData<Flag, Segment>, String);

pub trait FeatureRequester: Send {
fn get_all(&mut self) -> BoxFuture<Result<AllData<Flag, Segment>, FeatureRequesterError>>;
fn get_all(&mut self) -> BoxFuture<'_, Result<AllData<Flag, Segment>, FeatureRequesterError>>;
}

pub struct HyperFeatureRequester<C> {
Expand Down Expand Up @@ -49,7 +49,7 @@ impl<C> FeatureRequester for HyperFeatureRequester<C>
where
C: hyper::client::connect::Connect + Clone + Send + Sync + 'static,
{
fn get_all(&mut self) -> BoxFuture<Result<AllData<Flag, Segment>, FeatureRequesterError>> {
fn get_all(&mut self) -> BoxFuture<'_, Result<AllData<Flag, Segment>, FeatureRequesterError>> {
Box::pin(async {
let uri = self.url.clone();
let key = self.sdk_key.clone();
Expand Down