1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-09 07:27:46 +00:00

Properly address "warning: method default can be confused for the standard trait method std::default::Default::default"

This commit is contained in:
The Dax 2025-07-08 18:08:12 -04:00 committed by Joshua Goins
parent 93ddff8ed4
commit 9b03e2d7c2

View file

@ -7,8 +7,8 @@ pub struct GenericStorage<const N: usize> {
pub slots: Vec<Item>,
}
impl<const N: usize> GenericStorage<N> {
pub fn default() -> Self {
impl<const N: usize> Default for GenericStorage<N> {
fn default() -> Self {
Self {
slots: vec![Item::default(); N],
}