This commit is contained in:
vms 2020-05-02 12:12:16 +03:00
parent 661c9731a2
commit c76925660f
3 changed files with 9 additions and 6 deletions

View File

@ -26,8 +26,8 @@ jobs:
key: fce01-{{ checksum "Cargo.toml" }} key: fce01-{{ checksum "Cargo.toml" }}
workflows: workflows:
version: 2 version: 2.1
arqada: fce:
jobs: jobs:
- fce - fce

View File

@ -23,8 +23,8 @@
unreachable_patterns unreachable_patterns
)] )]
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]
mod vm;
mod misc; mod misc;
mod vm;
pub use vm::config::Config; pub use vm::config::Config;
pub use vm::frank::Frank; pub use vm::frank::Frank;

View File

@ -24,14 +24,14 @@
)] )]
#![warn(rust_2018_idioms)] #![warn(rust_2018_idioms)]
mod misc;
/// Command-line tool intended to test Frank VM. /// Command-line tool intended to test Frank VM.
mod vm; mod vm;
mod misc;
use crate::misc::SlicePrettyPrinter;
use crate::vm::config::Config; use crate::vm::config::Config;
use crate::vm::frank::Frank; use crate::vm::frank::Frank;
use crate::vm::service::FrankService; use crate::vm::service::FrankService;
use crate::misc::SlicePrettyPrinter;
use exitfailure::ExitFailure; use exitfailure::ExitFailure;
use std::fs; use std::fs;
@ -92,7 +92,10 @@ fn main() -> Result<(), ExitFailure> {
} }
"hash" => { "hash" => {
let hash = frank.compute_state_hash(); let hash = frank.compute_state_hash();
println!("vm state hash is {:2x}", SlicePrettyPrinter(hash.as_slice())); println!(
"vm state hash is {:2x}",
SlicePrettyPrinter(hash.as_slice())
);
} }
"help" => { "help" => {
println!( println!(