Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2c02e27

Browse filesBrowse files
coolreader18youknowone
authored andcommitted
Fix warnings for rust 1.87
1 parent 72dc495 commit 2c02e27
Copy full SHA for 2c02e27

File tree

Expand file treeCollapse file tree

3 files changed

+9
-4
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-4
lines changed

‎jit/src/instructions.rs

Copy file name to clipboardExpand all lines: jit/src/instructions.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,8 +1165,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
11651165

11661166
// ----- Merge: Return the final result.
11671167
self.builder.switch_to_block(merge_block);
1168-
let final_val = self.builder.block_params(merge_block)[0];
1169-
final_val
1168+
self.builder.block_params(merge_block)[0]
11701169
}
11711170

11721171
fn compile_ipow(&mut self, a: Value, b: Value) -> Value {

‎jit/src/lib.rs

Copy file name to clipboardExpand all lines: jit/src/lib.rs
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ pub enum JitCompileError {
1515
#[error("bad bytecode")]
1616
BadBytecode,
1717
#[error("error while compiling to machine code: {0}")]
18-
CraneliftError(#[from] ModuleError),
18+
CraneliftError(Box<ModuleError>),
19+
}
20+
21+
impl From<ModuleError> for JitCompileError {
22+
fn from(err: ModuleError) -> Self {
23+
Self::CraneliftError(Box::new(err))
24+
}
1925
}
2026

2127
#[derive(Debug, thiserror::Error, Eq, PartialEq)]

‎jit/tests/common.rs

Copy file name to clipboardExpand all lines: jit/tests/common.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl StackMachine {
7878

7979
pub fn run(&mut self, code: CodeObject) {
8080
let mut oparg_state = OpArgState::default();
81-
code.instructions.iter().try_for_each(|&word| {
81+
let _ = code.instructions.iter().try_for_each(|&word| {
8282
let (instruction, arg) = oparg_state.get(word);
8383
self.process_instruction(instruction, arg, &code.constants, &code.names)
8484
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.