diff --git a/src/schema/field.rs b/src/schema/field.rs index 4698ecb47..13ec3d131 100644 --- a/src/schema/field.rs +++ b/src/schema/field.rs @@ -12,13 +12,13 @@ pub struct Field(u32); impl Field { /// Create a new field object for the given FieldId. - pub fn from_field_id(field_id: u32) -> Field { + pub const fn from_field_id(field_id: u32) -> Field { Field(field_id) } /// Returns a u32 identifying uniquely a field within a schema. #[allow(clippy::trivially_copy_pass_by_ref)] - pub fn field_id(&self) -> u32 { + pub const fn field_id(&self) -> u32 { self.0 } }