remove debug requirement

This commit is contained in:
Aiden McClelland
2024-01-04 14:52:09 -07:00
parent b2bb376853
commit 3df960f8be
3 changed files with 8 additions and 14 deletions

View File

@@ -240,7 +240,7 @@ where
impl<P, H> Handler for CustomDisplay<P, H>
where
H: Handler,
P: Send + Sync + Clone + Debug + 'static,
P: Send + Sync + Clone + 'static,
{
type Context = H::Context;
fn handle_sync(
@@ -311,7 +311,6 @@ where
> + Send
+ Sync
+ Clone
+ Debug
+ 'static,
{
type Context = P::Context;
@@ -393,7 +392,7 @@ impl<Context, F, H> Handler for CustomDisplayFn<Context, F, H>
where
Context: Send + Sync + 'static,
H: Handler,
F: Send + Sync + Clone + Debug + 'static,
F: Send + Sync + Clone + 'static,
{
type Context = H::Context;
fn handle_sync(
@@ -456,12 +455,7 @@ impl<Context, F, H> CliBindings for CustomDisplayFn<Context, F, H>
where
Context: IntoContext,
H: CliBindings,
F: Fn(HandleArgs<Context, H>, H::Ok) -> Result<(), H::Err>
+ Send
+ Sync
+ Clone
+ Debug
+ 'static,
F: Fn(HandleArgs<Context, H>, H::Ok) -> Result<(), H::Err> + Send + Sync + Clone + 'static,
{
type Context = Context;
fn cli_command(&self, ctx_ty: TypeId) -> clap::Command {

View File

@@ -55,7 +55,7 @@ impl HandleAnyArgs {
}
#[async_trait::async_trait]
pub(crate) trait HandleAny: std::fmt::Debug + Send + Sync {
pub(crate) trait HandleAny: Send + Sync {
fn handle_sync(&self, handle_args: HandleAnyArgs) -> Result<Value, RpcError>;
async fn handle_async(&self, handle_args: HandleAnyArgs) -> Result<Value, RpcError>;
fn metadata(
@@ -122,7 +122,7 @@ pub trait PrintCliResult: HandlerTypes {
pub(crate) trait HandleAnyWithCli: HandleAny + CliBindingsAny {}
impl<T: HandleAny + CliBindingsAny> HandleAnyWithCli for T {}
#[derive(Debug, Clone)]
#[derive(Clone)]
#[allow(private_interfaces)]
pub enum DynHandler {
WithoutCli(Arc<dyn HandleAny>),
@@ -178,7 +178,7 @@ pub trait HandlerTypes {
}
#[async_trait::async_trait]
pub trait Handler: HandlerTypes + std::fmt::Debug + Clone + Send + Sync + 'static {
pub trait Handler: HandlerTypes + Clone + Send + Sync + 'static {
type Context: IntoContext;
fn handle_sync(
&self,

View File

@@ -67,7 +67,7 @@ impl<'a> std::borrow::Borrow<Option<&'a str>> for Name {
}
}
#[derive(Debug, Clone)]
#[derive(Clone)]
pub(crate) struct SubcommandMap(pub(crate) OrdMap<Name, OrdMap<Option<TypeId>, DynHandler>>);
impl SubcommandMap {
fn insert(
@@ -125,7 +125,7 @@ impl<Params, InheritedParams> Clone for ParentHandler<Params, InheritedParams> {
impl<Params, InheritedParams> std::fmt::Debug for ParentHandler<Params, InheritedParams> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple("ParentHandler")
.field(&self.subcommands)
// .field(&self.subcommands)
.finish()
}
}