Skip to content

Commit c7ca8f0

Browse files
authored
chore(fortuna): make fortuna a library crate (#2373)
* make fortuna a lib * refactor(fortuna): streamline module imports in main.rs
1 parent 48223c1 commit c7ca8f0

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

apps/fortuna/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name = "fortuna"
33
version = "7.4.1"
44
edition = "2021"
55

6+
[lib]
7+
name = "fortuna"
8+
path = "src/lib.rs"
9+
610
[dependencies]
711
anyhow = "1.0.75"
812
axum = { version = "0.6.20", features = ["json", "ws", "macros"] }

apps/fortuna/src/chain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pub(crate) mod ethereum;
2-
pub(crate) mod reader;
1+
pub mod ethereum;
2+
pub mod reader;

apps/fortuna/src/command/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub async fn run_keeper(
101101
rpc_metrics: Arc<RpcMetrics>,
102102
) -> Result<()> {
103103
let mut handles = Vec::new();
104-
let keeper_metrics = Arc::new({
104+
let keeper_metrics: Arc<KeeperMetrics> = Arc::new({
105105
let chain_labels: Vec<(String, Address)> = chains
106106
.iter()
107107
.map(|(id, state)| (id.clone(), state.provider_address))

apps/fortuna/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pub mod api;
2+
pub mod chain;
3+
pub mod command;
4+
pub mod config;
5+
pub mod eth_utils;
6+
pub mod keeper;
7+
pub mod state;

apps/fortuna/src/main.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
#![allow(clippy::just_underscores_and_digits)]
22

3-
use {anyhow::Result, clap::Parser, std::io::IsTerminal};
4-
5-
pub mod api;
6-
pub mod chain;
7-
pub mod command;
8-
pub mod config;
9-
pub mod eth_utils;
10-
pub mod keeper;
11-
pub mod state;
3+
use {
4+
anyhow::Result,
5+
clap::Parser,
6+
fortuna::{command, config},
7+
std::io::IsTerminal,
8+
};
129

1310
// Server TODO list:
1411
// - Tests

0 commit comments

Comments
 (0)