diff --git a/mongod_derive/src/lib.rs b/mongod_derive/src/lib.rs index 6069f68..a753d8a 100644 --- a/mongod_derive/src/lib.rs +++ b/mongod_derive/src/lib.rs @@ -120,7 +120,7 @@ pub fn referencable_derive(input: TokenStream) -> TokenStream { let name_str = name.to_string().to_snake(); let code = quote! { - impl mongod::model::reference::Referencable for MyStruct { + impl mongod::model::reference::Referencable for #name { fn collection_name() -> &'static str { #name_str }