Impl Default for AssetPath

This commit is contained in:
hodasemi 2023-01-21 14:16:14 +01:00
parent a6403e743f
commit e4deefae99

View file

@ -1,7 +1,7 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::{fmt::Display, path::Path, str::FromStr}; 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 { pub struct AssetPath {
#[serde(skip)] #[serde(skip)]
prefix: Option<String>, prefix: Option<String>,
@ -10,7 +10,7 @@ pub struct AssetPath {
} }
impl AssetPath { impl AssetPath {
pub const fn default() -> Self { pub const fn new() -> Self {
Self { Self {
prefix: None, prefix: None,
path: String::new(), path: String::new(),