Skip to content

Commit aa03130

Browse files
authored
Fix typo in NamedTypePathDef (#9102)
# Objective Fixes #9091 ## Solution Rename instances of `Primtive` to `Primitive` ## Migration Guide Before: ```rust let type_path = NamedTypePathDef::Primtive(ident); ``` After: ```rust let type_path = NamedTypePathDef::Primitive(ident); ```
1 parent c71ae26 commit aa03130

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/bevy_reflect/bevy_reflect_derive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ pub fn impl_type_path(input: TokenStream) -> TokenStream {
571571
generics,
572572
}
573573
}
574-
NamedTypePathDef::Primtive(ref ident) => ReflectTypePath::Primitive(ident),
574+
NamedTypePathDef::Primitive(ref ident) => ReflectTypePath::Primitive(ident),
575575
};
576576

577577
let meta = ReflectMeta::new(type_path, ReflectTraits::default());

crates/bevy_reflect/bevy_reflect_derive/src/type_path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub(crate) enum NamedTypePathDef {
7373
generics: Generics,
7474
custom_path: Option<CustomPathDef>,
7575
},
76-
Primtive(Ident),
76+
Primitive(Ident),
7777
}
7878

7979
impl Parse for NamedTypePathDef {
@@ -87,7 +87,7 @@ impl Parse for NamedTypePathDef {
8787
if path.leading_colon.is_none() && custom_path.is_none() {
8888
if path.segments.len() == 1 {
8989
let ident = path.segments.into_iter().next().unwrap().ident;
90-
Ok(NamedTypePathDef::Primtive(ident))
90+
Ok(NamedTypePathDef::Primitive(ident))
9191
} else {
9292
Err(input.error("non-customized paths must start with a double colon (`::`)"))
9393
}

0 commit comments

Comments
 (0)