Skip to content

Commit f6c56a2

Browse files
fix function name
Signed-off-by: Omar Mohamed <[email protected]>
1 parent fcd8ee8 commit f6c56a2

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

packages/manganis/manganis-core/src/css.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,17 @@ impl AssetOptionsBuilder<CssAssetOptions> {
8383
self
8484
}
8585

86-
/// Make the asset dynamically inserted (default: false)
86+
/// Make the asset statically inserted (default: false)
8787
///
88-
/// Dynamically inserting the file will use js to add it to the DOM, otherwise the file will
89-
/// be available at the initial rendering of the page.
88+
/// Statically insert the file at compile time.
9089
///
9190
/// ```rust
9291
/// # use manganis::{asset, Asset, AssetOptions};
93-
/// const _: Asset = asset!("/assets/style.css", AssetOptions::css().with_dynamic(true));
92+
/// const _: Asset = asset!("/assets/style.css", AssetOptions::css().with_static_head(true));
9493
/// ```
9594
#[allow(unused)]
96-
pub const fn with_dynamic(mut self, dynamic: bool) -> Self {
97-
self.variant.static_head = dynamic;
95+
pub const fn with_static_head(mut self, static_head: bool) -> Self {
96+
self.variant.static_head = static_head;
9897
self
9998
}
10099

packages/manganis/manganis-core/src/js.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,17 @@ impl AssetOptionsBuilder<JsAssetOptions> {
8585
self
8686
}
8787

88-
/// Make the asset dynamically inserted (default: false)
88+
/// Make the asset statically inserted (default: false)
8989
///
90-
/// Dynamically inserting the file will use js to add it to the DOM, otherwise the file will
91-
/// be available at the initial rendering of the page.
90+
/// Statically insert the file at compile time.
9291
///
9392
/// ```rust
9493
/// # use manganis::{asset, Asset, AssetOptions};
95-
/// const _: Asset = asset!("/assets/script.js", AssetOptions::js().with_dynamic(true));
94+
/// const _: Asset = asset!("/assets/script.js", AssetOptions::js().with_static_head(true));
9695
/// ```
9796
#[allow(unused)]
98-
pub const fn with_dynamic(mut self, dynamic: bool) -> Self {
99-
self.variant.static_head = dynamic;
97+
pub const fn with_static_head(mut self, static_head: bool) -> Self {
98+
self.variant.static_head = static_head;
10099
self
101100
}
102101

0 commit comments

Comments
 (0)