Remove Sized bound on Module

This commit is contained in:
selfhoster selfhoster 2023-04-19 22:25:50 +02:00
parent 74bfea3434
commit 863f48604c
2 changed files with 9 additions and 1 deletions

8
README.md Normal file
View File

@ -0,0 +1,8 @@
error[E0161]: cannot move a value of type `dyn Module<A, S, E>`
--> src/modules/mod.rs:83:19
|
83 | let res = cmd.run();
| ^^^^^^^^^ the size of `dyn Module<A, S, E>` cannot be statically determined
For more information about this error, try `rustc --explain E0161`.
error: could not compile `rustible` due to previous error

View File

@ -116,7 +116,7 @@ pub trait ModuleSetup<A, S, E> {
/// A Module takes some arguments which can be serialized back to the playbook run, and can be run to produce
/// a certain result.
pub trait Module<A: Serialize, S: Serialize, E: Serialize>: Sized {
pub trait Module<A: Serialize, S: Serialize, E: Serialize> {
/// Return the module name as string slice
fn module_name(&self) -> &'static str;