Skip to content

Commit

Permalink
fix: unneeded return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed Dec 10, 2024
1 parent 1abf5a0 commit 38fc93b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions resolver/src/partner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ pub async fn load(
match partner {
Partner::Registry(p) => {
let registry = p.registry.clone().unwrap_or_else(|| "catalog".to_string());
return match registry.as_str() {
match registry.as_str() {
"catalog" => load_from_catalog(credentials, name, &p.version),
"hub" => load_from_cluster(client, name).await,
x => Err(ResolveError::UnknownCharacterRegistry(x.to_string())),
};
}
}

Partner::Repository(reference) => load_from_source(credentials, reference),
Expand Down
11 changes: 4 additions & 7 deletions workflow/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ mod tests {
#[allow(dead_code)]
struct TestState;

#[test]
fn test_impl_state_trait() {
#[async_trait]
impl State<()> for TestState {
async fn handle(&self, _ctx: &Context<()>) -> Option<Intent<()>> {
Some(Intent::Action(Action::await_change()))
}
#[async_trait]
impl State<()> for TestState {
async fn handle(&self, _ctx: &Context<()>) -> Option<Intent<()>> {
Some(Intent::Action(Action::await_change()))
}
}
}

0 comments on commit 38fc93b

Please sign in to comment.