Skip to content

Commit ef3a3a4

Browse files
committed
Rework some Vm functions
1 parent 9d96aba commit ef3a3a4

File tree

4 files changed

+204
-214
lines changed

4 files changed

+204
-214
lines changed

crates/rune-cli/src/run.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,22 +220,22 @@ pub(crate) async fn run(
220220

221221
while let Some((count, frame)) = it.next() {
222222
let stack_top = match it.peek() {
223-
Some((_, next)) => next.stack_bottom(),
223+
Some((_, next)) => next.stack_bottom,
224224
None => stack.stack_bottom(),
225225
};
226226

227227
let values = stack
228-
.get(frame.stack_bottom()..stack_top)
228+
.get(frame.stack_bottom..stack_top)
229229
.expect("bad stack slice");
230230

231-
writeln!(io.stdout, " frame #{} (+{})", count, frame.stack_bottom())?;
231+
writeln!(io.stdout, " frame #{} (+{})", count, frame.stack_bottom)?;
232232

233233
if values.is_empty() {
234234
writeln!(io.stdout, " *empty*")?;
235235
}
236236

237237
for (n, value) in stack.iter().enumerate() {
238-
writeln!(io.stdout, "{}+{} = {:?}", frame.stack_bottom(), n, value)?;
238+
writeln!(io.stdout, "{}+{} = {:?}", frame.stack_bottom, n, value)?;
239239
}
240240
}
241241

crates/rune/src/compile/meta.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ pub struct Signature {
255255
/// Arguments.
256256
pub(crate) args: Option<usize>,
257257
/// Return type of the function.
258+
#[cfg_attr(not(feature = "doc"), allow(unused))]
258259
pub(crate) return_type: Option<Hash>,
259260
/// The kind of a signature.
260261
pub(crate) kind: SignatureKind,

crates/rune/src/diagnostics/emit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl VmError {
9797
None => continue,
9898
};
9999

100-
for ip in [l.ip].into_iter().chain(l.frames.iter().rev().map(|v| v.ip())) {
100+
for ip in [l.ip].into_iter().chain(l.frames.iter().rev().map(|v| v.ip)) {
101101
let debug_inst = match debug_info.instruction_at(ip) {
102102
Some(debug_inst) => debug_inst,
103103
None => continue,

0 commit comments

Comments
 (0)