From 1c7e267b815585b0ac9c6a4e3e12e99ae6ab26e0 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Tue, 9 Mar 2021 09:54:54 +0800 Subject: [PATCH] lint: format codes (#97) --- src/matchengine/market.rs | 8 ++++---- src/matchengine/server.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/matchengine/market.rs b/src/matchengine/market.rs index 5f40885e..cb78e60f 100644 --- a/src/matchengine/market.rs +++ b/src/matchengine/market.rs @@ -940,12 +940,12 @@ mod tests { use super::*; use crate::asset::AssetManager; use rust_decimal_macros::*; - use std::fs::File; - use std::io::Write; + // use std::fs::File; + // use std::io::Write; //use std::fmt::{Error}; //use std::io::prelude::*; - use rand::Rng; - use rust_decimal::prelude::FromPrimitive; + // use rand::Rng; + // use rust_decimal::prelude::FromPrimitive; fn get_simple_market_config() -> config::Market { config::Market { diff --git a/src/matchengine/server.rs b/src/matchengine/server.rs index b228b440..a69ca9ab 100644 --- a/src/matchengine/server.rs +++ b/src/matchengine/server.rs @@ -244,19 +244,19 @@ impl Matchengine for GrpcHandler { } #[cfg(not(debug_assertions))] - async fn debug_dump(&self, request: Request) -> Result, Status> { + async fn debug_dump(&self, _request: Request) -> Result, Status> { println!("Warning: Not avaliable in release build"); Ok(Response::new(DebugDumpResponse {})) } #[cfg(not(debug_assertions))] - async fn debug_reset(&self, request: Request) -> Result, Status> { + async fn debug_reset(&self, _request: Request) -> Result, Status> { println!("Warning: Not avaliable in release build"); Ok(Response::new(DebugResetResponse {})) } #[cfg(not(debug_assertions))] - async fn debug_reload(&self, request: Request) -> Result, Status> { + async fn debug_reload(&self, _request: Request) -> Result, Status> { println!("Warning: Not avaliable in release build"); Ok(Response::new(DebugReloadResponse {})) }