Skip to content

Commit

Permalink
Rename AppExt to RegisterManifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Alice Cecile committed Apr 17, 2024
1 parent 01be07f commit 1322e7b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/entities_from_manifests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use leafwing_manifest::{
asset_state::SimpleAssetState,
identifier::Id,
manifest::{Manifest, ManifestFormat},
plugin::{AppExt, ManifestPlugin},
plugin::{ManifestPlugin, RegisterManifest},
};
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion examples/raw_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use leafwing_manifest::{
asset_state::SimpleAssetState,
identifier::Id,
manifest::{Manifest, ManifestFormat},
plugin::{AppExt, ManifestPlugin},
plugin::{ManifestPlugin, RegisterManifest},
};
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use leafwing_manifest::{
asset_state::SimpleAssetState,
identifier::Id,
manifest::{Manifest, ManifestFormat},
plugin::{AppExt, ManifestPlugin},
plugin::{ManifestPlugin, RegisterManifest},
};
use serde::{Deserialize, Serialize};

Expand Down
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<S: AssetLoadingState> Plugin for ManifestPlugin<S> {
}

/// An extension trait for registering manifests with an app.
pub trait AppExt {
pub trait RegisterManifest {
/// Registers a manifest with the app, preparing it for loading and parsing.
///
/// The final manifest type must implement [`Manifest`], while the raw manifest type must implement [`Asset`](bevy::asset::Asset).
Expand All @@ -66,7 +66,7 @@ pub trait AppExt {
#[derive(SystemSet, PartialEq, Eq, Hash, Debug, Clone)]
struct ProcessManifestSet;

impl AppExt for App {
impl RegisterManifest for App {
/// Registers the manifest `M`.
///
/// By default, the path root is the `assets` folder, just like all Bevy assets.
Expand Down

0 comments on commit 1322e7b

Please sign in to comment.