format code after changing layout

This commit is contained in:
Mengran Lan
2024-05-27 23:35:33 +08:00
parent d8f8880ab9
commit 32e95fb370
3 changed files with 6 additions and 11 deletions

View File

@@ -4,20 +4,19 @@ mod geth_client;
mod key_signer;
mod prover;
mod task_cache;
mod task_processor;
mod types;
mod utils_log;
mod version;
mod zk_circuits_handler;
mod task_processor;
use anyhow::Result;
use config::Config;
use prover::Prover;
use std::rc::Rc;
use task_cache::{TaskCache, ClearCacheCoordinatorListener};
use task_cache::{ClearCacheCoordinatorListener, TaskCache};
use task_processor::TaskProcessor;
fn main() -> Result<(), Box<dyn std::error::Error>> {
utils_log::log_init();

View File

@@ -1,10 +1,9 @@
use anyhow::{Ok, Result};
use super::coordinator_client::{listener::Listener, types::SubmitProofRequest};
use crate::types::TaskWrapper;
use sled::{Config, Db};
use std::rc::Rc;
use super::coordinator_client::types::SubmitProofRequest;
use super::coordinator_client::listener::Listener;
pub struct TaskCache {
db: Db,
@@ -14,7 +13,7 @@ impl TaskCache {
pub fn new(db_path: &String) -> Result<Self> {
let config = Config::new().path(db_path);
let db = config.open()?;
Ok(Self{db})
Ok(Self { db })
}
pub fn put_task(&self, task_wrapper: &TaskWrapper) -> Result<()> {
@@ -61,4 +60,3 @@ impl Listener for ClearCacheCoordinatorListener {
}
}
}

View File

@@ -1,8 +1,6 @@
use super::{prover::Prover, task_cache::TaskCache, types::TaskWrapper};
use anyhow::{Context, Result};
use log;
use super::prover::Prover;
use super::task_cache::TaskCache;
use super::types::TaskWrapper;
use std::rc::Rc;
pub struct TaskProcessor<'a> {
@@ -84,4 +82,4 @@ impl<'a> TaskProcessor<'a> {
anyhow::anyhow!("zk proving panic for task"),
)
}
}
}