rust-lang-ua / rustcamp

Getting ready for prod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[WIP] Invalid type signature in 1_7

imlvts opened this issue · comments

Summary

in task 1_7, CommandHandler::handle_command has a signature which cannot be implemented.

impl CommandHandler<CreateUser> for User {
    type Context = dyn UserRepository;
    type Result = Result<(), UserError>;
    
    fn handle_command(&self, cmd: &C, ctx: &Self::Context) -> Self::Result {
        // Here we operate with UserRepository
        // via its trait object: &dyn UserRepository
    }
}

Steps to reproduce

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Possible fixes

commented

Well isn't it our task to implement it? ;)

this one is already fixed in: 480548b