diff --git a/crates/bevy_asset/src/path.rs b/crates/bevy_asset/src/path.rs index fccc0783f6..db2c48fb88 100644 --- a/crates/bevy_asset/src/path.rs +++ b/crates/bevy_asset/src/path.rs @@ -115,7 +115,7 @@ impl<'a> AssetPath<'a> { /// /// This will return a [`ParseAssetPathError`] if `asset_path` is in an invalid format. pub fn try_parse(asset_path: &'a str) -> Result, ParseAssetPathError> { - let (source, path, label) = Self::parse_internal(asset_path).unwrap(); + let (source, path, label) = Self::parse_internal(asset_path)?; Ok(Self { source: match source { Some(source) => AssetSourceId::Name(CowArc::Borrowed(source)),