From 7578d299002bd0d7d7d9f0cc6a9fa61ef9bc1482 Mon Sep 17 00:00:00 2001 From: shuo-young <2857043555@qq.com> Date: Wed, 10 Jan 2024 17:34:53 +0800 Subject: [PATCH] init test --- src/graph/call_graph.rs | 2 +- src/lib.rs | 8 +------- src/main.rs | 28 ++-------------------------- 3 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/graph/call_graph.rs b/src/graph/call_graph.rs index 506823f..1681f69 100644 --- a/src/graph/call_graph.rs +++ b/src/graph/call_graph.rs @@ -1,7 +1,7 @@ use crate::{contract::contract::Contract, Source}; use std::collections::{HashMap, HashSet}; -#[allow(unused_attributes)] +#[allow(dead_code)] pub struct CallGraph { output: String, visited_contracts: HashSet, diff --git a/src/lib.rs b/src/lib.rs index 1cba692..01cb85c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,6 @@ #[cfg(test)] mod tests { - #[test] - fn exploration() { - assert_eq!(2 + 2, 4); - } #[test] - fn another() { - panic!("Make this test fail"); - } + fn test_input() {} } diff --git a/src/main.rs b/src/main.rs index cd41ee9..ae57d75 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,32 +20,8 @@ struct Source { level: u32, } -impl Source { - pub fn new( - platform: String, - logic_addr: String, - storage_addr: String, - func_sign: String, - block_number: u64, - caller: String, - caller_func_sign: String, - call_site: String, - level: u32, - ) -> Source { - Source { - platform: platform, - logic_addr: logic_addr, - storage_addr: storage_addr, - func_sign: func_sign, - block_number: block_number, - caller: caller, - caller_func_sign: caller_func_sign, - call_site: call_site, - level: level, - } - } -} - +#[allow(unused_mut)] +#[allow(unused_variables)] #[tokio::main] async fn main() { env_logger::init();