Thanks! I wish the compiler would tell me this. I had Option<Box<Foo>>, everything done as in Rust By Example. Then I did option_with_struct_that_implements_foo.map(Box::new), but the compiler was saying that:
expected trait object
dyn Foo, found structStructThatImplementsFoo