mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
7a72bac779
# Objective Fix #9960 ## Solution Make the `visit` parameter `_visit` if there are no dependencies. New `cargo expand` output: ```rust pub struct Rarity { pub name: SharedStr, pub color: Color, } impl bevy::asset::Asset for Rarity {} impl bevy::asset::VisitAssetDependencies for Rarity { fn visit_dependencies( &self, _visit: &mut impl FnMut(bevy::asset::UntypedAssetId), // <-- fixed ) {} } impl bevy::reflect::TypePath for Rarity { fn type_path() -> &'static str { "myasset::item::Rarity" } fn short_type_path() -> &'static str { "Rarity" } fn type_ident() -> Option<&'static str> { ::core::option::Option::Some("Rarity") } fn crate_name() -> Option<&'static str> { ::core::option::Option::Some( "myasset::item".split(':').next().unwrap(), ) } fn module_path() -> Option<&'static str> { ::core::option::Option::Some("myasset::item") } } ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |