Move `type Callback` def near where it's used
Moves the `type Callback` definition in the `splinter::network::auth2`
module near where it's used. This improves understandability.
@@ -160,6 +160,9 @@ impl ShutdownSignaler {
}
}
+type Callback =
+ Box<dyn Fn(ConnectionAuthorizationState) -> Result<(), Box<dyn std::error::Error>> + Send>;
+
pub struct PoolAuthorizer {
local_identity: String,
shared: Arc<Mutex<ManagedAuthorizations>>,
@@ -388,9 +391,6 @@ impl AuthorizationPoolStateMachine {
}
}
-type Callback =
- Box<dyn Fn(ConnectionAuthorizationState) -> Result<(), Box<dyn std::error::Error>> + Send>;
-
#[derive(Default)]
struct ManagedAuthorizations {
states: HashMap<String, AuthorizationState>,
