Skip to content

Commit

Permalink
doc(autonomi): replace connect with init in doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
b-zee committed Dec 16, 2024
1 parent 82c0369 commit 1f363f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions autonomi/src/client/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl Client {
/// use autonomi::{Client, Bytes};
/// # #[tokio::main]
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// # let client = Client::connect(&[]).await?;
/// # let client = Client::init().await?;
/// # let data_map = todo!();
/// let data_fetched = client.data_get(data_map).await?;
/// # Ok(())
Expand Down Expand Up @@ -195,7 +195,7 @@ impl Client {
/// use autonomi::{Client, Bytes};
/// # #[tokio::main]
/// # async fn main() -> Result<(), Box<dyn std::error::Error>> {
/// # let client = Client::connect(&[]).await?;
/// # let client = Client::init().await?;
/// # let wallet = todo!();
/// let data = Bytes::from("Hello, World");
/// let data_map = client.data_put(data, wallet).await?;
Expand Down
2 changes: 1 addition & 1 deletion autonomi/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Default for ClientConfig {
}
}

/// Error returned by [`Client::connect`].
/// Error returned by [`Client::init`].
#[derive(Debug, thiserror::Error)]
pub enum ConnectError {
/// Did not manage to populate the routing table with enough peers.
Expand Down
4 changes: 2 additions & 2 deletions autonomi/tests/evm/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod test {
async fn file_into_vault() -> eyre::Result<()> {
common::enable_logging();

let mut client = Client::connect(&[])
let mut client = Client::init()
.await?
.with_vault_entropy(Bytes::from("at least 32 bytes of entropy here"))?;

Expand All @@ -66,7 +66,7 @@ mod test {
);

// now assert over the stored account packet
let new_client = Client::connect(&[])
let new_client = Client::init()
.await?
.with_vault_entropy(Bytes::from("at least 32 bytes of entropy here"))?;

Expand Down

0 comments on commit 1f363f9

Please sign in to comment.