Hi rustaceans, I am a rust beginner. I successfully wrote this little server that can serve a resized JPG.
But I’m curious why I needed to introduce a type annotation that feels like it should not have been necessary. If I try to skip the declaration of
b and use
thumbnail directly instead, I get:
src/main.rs:62:12: 62:26 error: the trait `modifier::Modifier<iron::response::Response>` is not implemented for the type `Box<MyImage>` [E0277] src/main.rs:62 Ok(Response::with((content_type.clone(), status::Ok, thumbnail))) ^~~~~~~~~~~~~~