fix: use correct syntax in doctests

This commit is contained in:
Radical 2025-05-24 03:34:07 +02:00
parent 6832215aaa
commit 53e5238485
2 changed files with 5 additions and 5 deletions

View file

@ -89,7 +89,7 @@ impl Client {
/// // Bunny.net api key
/// let mut client = Client::new("api_key").await?;
///
/// let countries = client.get_countries().await?;
/// let countries = client.get_country_list().await?;
///
/// println!("{:#?}", countries);
/// Ok(())
@ -191,7 +191,7 @@ impl Client {
/// // Bunny.net api key
/// let mut client = Client::new("api_key").await?;
///
/// client.purge_url("https://url_to_purge.com", false).await?;
/// client.purge_url("https://url_to_purge.com".parse()?, false).await?;
///
/// Ok(())
/// }

View file

@ -144,7 +144,7 @@ impl<'a> Storage {
/// let file_bytes = fs::read("path/to/file.png").await.unwrap();
///
/// // Will put a file in STORAGE_ZONE/images/file.png
/// client.storage.upload("/images/file.png", file_bytes).await?;
/// client.storage.upload("/images/file.png", file_bytes.into()).await?;
///
/// Ok(())
/// }
@ -184,7 +184,7 @@ impl<'a> Storage {
/// let contents = client.storage.download("/images/file.png").await?;
///
/// let mut file = fs::File::create("file.png").await.unwrap();
/// file.write_all(contents).await.unwrap();
/// file.write_all(&contents).await.unwrap();
///
/// Ok(())
/// }
@ -253,7 +253,7 @@ impl<'a> Storage {
/// // Will list the files in STORAGE_ZONE/images/
/// let files = client.storage.list("/images/").await?;
///
/// println!("{:#?}", files)
/// println!("{:#?}", files);
///
/// Ok(())
/// }