From e4deefae99b003e6f95c94dd9d4ce3e126709893 Mon Sep 17 00:00:00 2001 From: hodasemi Date: Sat, 21 Jan 2023 14:16:14 +0100 Subject: [PATCH] Impl Default for AssetPath --- assetpath/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assetpath/src/lib.rs b/assetpath/src/lib.rs index 0a8839f..eb7f6ad 100644 --- a/assetpath/src/lib.rs +++ b/assetpath/src/lib.rs @@ -1,7 +1,7 @@ use serde::{Deserialize, Serialize}; use std::{fmt::Display, path::Path, str::FromStr}; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash, Default)] pub struct AssetPath { #[serde(skip)] prefix: Option, @@ -10,7 +10,7 @@ pub struct AssetPath { } impl AssetPath { - pub const fn default() -> Self { + pub const fn new() -> Self { Self { prefix: None, path: String::new(),