Make the generic of CliConfiguration explicit (#11223)

Othewise the compiler will complain if someone passes something that
implements `CliConfiguration<DVC>` but `DVC` is not the default `()`.
This commit is contained in:
Liu-Cheng Xu
2022-04-14 17:18:54 +08:00
committed by GitHub
parent 298fdf3012
commit 001ade9c5d
+4 -1
View File
@@ -196,7 +196,10 @@ pub trait SubstrateCli: Sized {
/// Create a runner for the command provided in argument. This will create a Configuration and
/// a tokio runtime
fn create_runner<T: CliConfiguration>(&self, command: &T) -> error::Result<Runner<Self>> {
fn create_runner<T: CliConfiguration<DVC>, DVC: DefaultConfigurationValues>(
&self,
command: &T,
) -> error::Result<Runner<Self>> {
let tokio_runtime = build_runtime()?;
let config = command.create_configuration(self, tokio_runtime.handle().clone())?;