Skip to content

Commit 29f67a3

Browse files
authored
forth: Change stack return type to slice (#1032)
Closes #961: returning an owned value for a getter that is used for tests only is a bit silly, so this changes the return type of the `Forth::stack` method from `Vec<Value>` to `&[Value]`. It does not require changing the tests. Signed-off-by: Paul Mabileau <[email protected]>
1 parent 6fbf6e2 commit 29f67a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/forth/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Forth {
1616
unimplemented!()
1717
}
1818

19-
pub fn stack(&self) -> Vec<Value> {
19+
pub fn stack(&self) -> &[Value] {
2020
unimplemented!()
2121
}
2222

0 commit comments

Comments
 (0)