Skip to content

Commit

Permalink
feat: make Settings private, and depend on the builder instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Nov 1, 2024
1 parent cb2cb1f commit 11037b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ All notable changes to mainline dht will be documented in this file.
### Removed

- Removed `mainline::error::Error` and `mainline::error::Result`.
- Removed `Settings` as a publicly exported struct.
2 changes: 1 addition & 1 deletion src/dht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl Dht {
///
/// Could return an error if it failed to bind to the specified
/// port or other io errors while binding the udp socket.
pub fn new(settings: Settings) -> Result<Self, std::io::Error> {
pub(crate) fn new(settings: Settings) -> Result<Self, std::io::Error> {
let (sender, receiver) = flume::bounded(32);

let rpc = Rpc::new(&settings)?;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod rpc;
pub mod server;

pub use crate::common::{Id, MutableItem, Node};
pub use dht::{Dht, Settings, Testnet};
pub use dht::{Dht, Testnet};

pub use bytes::Bytes;
pub use ed25519_dalek::SigningKey;
Expand Down

0 comments on commit 11037b4

Please sign in to comment.