Skip to content

Commit 61d267a

Browse files
SWW13udoprog
authored andcommitted
Add constant vec example
1 parent 2d69c58 commit 61d267a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/rune/src/module/module.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ impl Module {
319319
/// /// A global ten value.
320320
/// });
321321
///
322+
/// module.constant("VEC", [1, 2, 3].as_slice())
323+
/// .build()?;
324+
///
322325
/// module.constant("TEN", 10)
323326
/// .build_associated::<MyType>()?
324327
/// .docs(docstring! {

0 commit comments

Comments
 (0)