Skip to content

Commit

Permalink
Simplified stack-ref example
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Nov 27, 2022
1 parent 4634e87 commit 4d4eae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/stack-ref/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ fn main() {
version: env!("CARGO_PKG_VERSION"),
};
let utils = Utils;
let items = &[1i32, 2, 3, 4][..];
let items = [1i32, 2, 3, 4];

scope(|scope| {
let ctx = context! {
config => scope.struct_object_ref(&config),
utils => scope.object_ref(&utils),
items => scope.seq_object_ref(&items),
items => scope.seq_object_ref(&items[..]),
};
println!(
"{}",
Expand Down

0 comments on commit 4d4eae8

Please sign in to comment.