Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wilyle committed Feb 16, 2024
1 parent d0bf143 commit a052f94
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ impl ServiceDiscoveryAdapter for ChariottServiceDiscoveryAdapter {
///
/// # Arguments
/// - `id`: the service identifier
async fn get_service_uri<'a>(&self, id: &'a str) -> Result<String, ServiceDiscoveryAdapterError> {
async fn get_service_uri<'a>(
&self,
id: &'a str,
) -> Result<String, ServiceDiscoveryAdapterError> {
let pieces = id.split('/').collect::<Vec<_>>();
if pieces.len() != 3 {
return Err(ServiceDiscoveryAdapterErrorKind::InvalidId.into());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ impl ServiceDiscoveryAdapter for FileServiceDiscoveryAdapter {
///
/// # Arguments
/// - `id`: the service identifier
async fn get_service_uri<'a>(&self, id: &'a str) -> Result<String, ServiceDiscoveryAdapterError> {
async fn get_service_uri<'a>(
&self,
id: &'a str,
) -> Result<String, ServiceDiscoveryAdapterError> {
self.config
.services
.get(id)
Expand Down
5 changes: 4 additions & 1 deletion common/src/service_discovery_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ pub trait ServiceDiscoveryAdapter {
///
/// # Arguments
/// - `id`: the service identifier
async fn get_service_uri<'a>(&self, id: &'a str) -> Result<String, ServiceDiscoveryAdapterError>;
async fn get_service_uri<'a>(
&self,
id: &'a str,
) -> Result<String, ServiceDiscoveryAdapterError>;
}

proc_macros::error! {
Expand Down
5 changes: 4 additions & 1 deletion common/src/service_discovery_adapter_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ pub trait ServiceDiscoveryAdapterSelector {
///
/// # Arguments
/// - `id`: the service identifier
async fn get_service_uri<'a>(&self, id: &'a str) -> Result<String, ServiceDiscoveryAdapterError>;
async fn get_service_uri<'a>(
&self,
id: &'a str,
) -> Result<String, ServiceDiscoveryAdapterError>;
}
5 changes: 4 additions & 1 deletion freyja/src/service_discovery_adapter_selector_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ impl ServiceDiscoveryAdapterSelector for ServiceDiscoveryAdapterSelectorImpl {
///
/// # Arguments
/// - `id`: the service identifier
async fn get_service_uri<'a>(&self, id: &'a str) -> Result<String, ServiceDiscoveryAdapterError> {
async fn get_service_uri<'a>(
&self,
id: &'a str,
) -> Result<String, ServiceDiscoveryAdapterError> {
for adapter in self.adapters.iter() {
log::debug!(
"Attempting to discover uri for service {id} from adapter {}...",
Expand Down

0 comments on commit a052f94

Please sign in to comment.