Skip to content

Commit

Permalink
Fix cargo check
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Oct 22, 2024
1 parent 857d3ab commit 8f25949
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions definitions/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ macro_rules! __for_each_inst_inner {
/// a callback macro that takes (at least) 3 arguments:
///
/// 1. $name: an identifier containing the full defined opcode name,
/// e.g., OP_ADD
/// e.g., OP_ADD
/// 2. $real_name: an identifier containing just the opcode part, e.g., ADD
/// 3. $code: an expr containing the actual opcode number
///
Expand Down Expand Up @@ -324,10 +324,10 @@ macro_rules! for_each_inst2 {
/// arguments:
///
/// * A callback macro that takes the exact same arguments as callback
/// macro in +for_each_inst+
/// macro in +for_each_inst+
/// * A value expression containing the actual value to match against.
/// * An expression used as wildcard matches when the passed value does
/// not match any opcode
/// not match any opcode
///
/// * Free variables are attached to the variants ending with match1, match2, etc.
#[macro_export]
Expand Down Expand Up @@ -357,7 +357,7 @@ macro_rules! for_each_inst_match2 {
/// Generates an array on all instructions
///
/// * A callback macro that takes the exact same arguments as callback
/// macro in +for_each_inst+
/// macro in +for_each_inst+
///
/// * Free variables are attached to the variants ending with fold1, fold2, etc.
#[macro_export]
Expand Down
2 changes: 1 addition & 1 deletion examples/check_real_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn get_current_memory_linux() -> usize {
}

fn get_current_memory() -> usize {
if !cfg!(linux) {
if !cfg!(target_os = "linux") {
get_current_memory_linux()
} else {
let pid = format!("{}", id());
Expand Down
2 changes: 1 addition & 1 deletion src/snapshot2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ impl<I: Clone + PartialEq, D: DataSource<I>> Snapshot2Context<I, D> {
/// 1. use elf::parse_elf to generate ProgramMetadata
/// 2. use DefaultMachine::load_program_with_metadata to load the program
/// 3. Pass ProgramMetadata to this method so we can track memory pages from
/// program, so as to further reduce the size of the generated snapshot.
/// program, so as to further reduce the size of the generated snapshot.
///
/// One can also use the original DefaultMachine::load_program, and parse the
/// ELF a second time to extract metadata for this method. However the above
Expand Down
4 changes: 3 additions & 1 deletion tests/test_resume2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use ckb_vm::machine::{
use ckb_vm::memory::{sparse::SparseMemory, wxorx::WXorXMemory};
use ckb_vm::registers::{A0, A1, A7};
use ckb_vm::snapshot2::{DataSource, Snapshot2, Snapshot2Context};
use ckb_vm::{DefaultMachineBuilder, Error, Memory, Register, Syscalls, ISA_A, ISA_IMC};
#[allow(unused_imports)]
use ckb_vm::Memory;
use ckb_vm::{DefaultMachineBuilder, Error, Register, Syscalls, ISA_A, ISA_IMC};
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
Expand Down

0 comments on commit 8f25949

Please sign in to comment.