From 4bf1a102de389fe2393409c2f4f632e97a038065 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Fri, 10 Jan 2025 20:26:16 +0800 Subject: [PATCH] fix(tracing): rename lib name from forest_filecoin to forest --- Cargo.toml | 3 +++ interop-tests/src/tests/bitswap_go_compat.rs | 2 +- interop-tests/src/tests/kad_go_compat.rs | 2 +- src/bin/forest-cli.rs | 2 +- src/bin/forest-tool.rs | 2 +- src/bin/forest-wallet.rs | 2 +- src/bin/forest.rs | 2 +- tests/config.rs | 2 +- tests/keystore_tests.rs | 4 ++-- 9 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f428f4d9de8..1541ac1457b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,9 @@ license = "MIT OR Apache-2.0" description = "Rust Filecoin implementation." exclude = [".config", ".github", ".maintain", "documentation", "scripts", "interop-tests", "go.work*"] +[lib] +name = "forest" + [workspace.dependencies] anyhow = "1" cid = { version = "0.11", default-features = false, features = ["std"] } diff --git a/interop-tests/src/tests/bitswap_go_compat.rs b/interop-tests/src/tests/bitswap_go_compat.rs index 6f554f5637e..68d2acfea13 100644 --- a/interop-tests/src/tests/bitswap_go_compat.rs +++ b/interop-tests/src/tests/bitswap_go_compat.rs @@ -3,7 +3,7 @@ use super::go_ffi::*; use cid::Cid; -use forest_filecoin::interop_tests_private::libp2p_bitswap::{ +use forest::interop_tests_private::libp2p_bitswap::{ BitswapBehaviour, BitswapBehaviourEvent, BitswapMessage, BitswapRequest, BitswapResponse, }; use libp2p::{ diff --git a/interop-tests/src/tests/kad_go_compat.rs b/interop-tests/src/tests/kad_go_compat.rs index 4c7b77ccd92..0e415fea866 100644 --- a/interop-tests/src/tests/kad_go_compat.rs +++ b/interop-tests/src/tests/kad_go_compat.rs @@ -3,7 +3,7 @@ use super::go_ffi::*; -use forest_filecoin::interop_tests_private::libp2p::discovery::new_kademlia; +use forest::interop_tests_private::libp2p::discovery::new_kademlia; use futures::StreamExt as _; use libp2p::{ identify, identity, kad, noise, swarm::SwarmEvent, tcp, yamux, Multiaddr, StreamProtocol, diff --git a/src/bin/forest-cli.rs b/src/bin/forest-cli.rs index 1729e96e4ea..b8c82feb82a 100644 --- a/src/bin/forest-cli.rs +++ b/src/bin/forest-cli.rs @@ -2,5 +2,5 @@ // SPDX-License-Identifier: Apache-2.0, MIT fn main() -> anyhow::Result<()> { - forest_filecoin::forest_main(std::env::args_os()) + forest::forest_main(std::env::args_os()) } diff --git a/src/bin/forest-tool.rs b/src/bin/forest-tool.rs index 1b40d6fc586..51aabad346e 100644 --- a/src/bin/forest-tool.rs +++ b/src/bin/forest-tool.rs @@ -2,5 +2,5 @@ // SPDX-License-Identifier: Apache-2.0, MIT fn main() -> anyhow::Result<()> { - forest_filecoin::forest_tool_main(std::env::args_os()) + forest::forest_tool_main(std::env::args_os()) } diff --git a/src/bin/forest-wallet.rs b/src/bin/forest-wallet.rs index 848b5e94690..0ac94a4bf00 100644 --- a/src/bin/forest-wallet.rs +++ b/src/bin/forest-wallet.rs @@ -2,5 +2,5 @@ // SPDX-License-Identifier: Apache-2.0, MIT fn main() -> anyhow::Result<()> { - forest_filecoin::forest_wallet_main(std::env::args_os()) + forest::forest_wallet_main(std::env::args_os()) } diff --git a/src/bin/forest.rs b/src/bin/forest.rs index 5f560f39fca..f7d48d76b2a 100644 --- a/src/bin/forest.rs +++ b/src/bin/forest.rs @@ -2,5 +2,5 @@ // SPDX-License-Identifier: Apache-2.0, MIT fn main() -> anyhow::Result<()> { - forest_filecoin::forestd_main(std::env::args_os()) + forest::forestd_main(std::env::args_os()) } diff --git a/tests/config.rs b/tests/config.rs index 963cc09e75e..44ba4af5e29 100644 --- a/tests/config.rs +++ b/tests/config.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0, MIT use std::io::Write; -use forest_filecoin::{Client, Config}; +use forest::{Client, Config}; use tempfile::TempDir; pub mod common; diff --git a/tests/keystore_tests.rs b/tests/keystore_tests.rs index 0a70fba8887..aee2a5b3254 100644 --- a/tests/keystore_tests.rs +++ b/tests/keystore_tests.rs @@ -3,8 +3,8 @@ pub mod common; -use forest_filecoin::{verify_token, JWT_IDENTIFIER}; -use forest_filecoin::{ +use forest::{verify_token, JWT_IDENTIFIER}; +use forest::{ KeyStore, KeyStoreConfig, ENCRYPTED_KEYSTORE_NAME, FOREST_KEYSTORE_PHRASE_ENV, KEYSTORE_NAME, };