Compare commits

..

No commits in common. "53e5238485efe3a293aa1932c54e914bb1b1ca40" and "d66a3d085069506efda4c85aa2880982a8cae23b" have entirely different histories.

4 changed files with 5 additions and 19 deletions

12
Cargo.lock generated
View file

@ -1075,21 +1075,9 @@ dependencies = [
"mio", "mio",
"pin-project-lite", "pin-project-lite",
"socket2", "socket2",
"tokio-macros",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
[[package]]
name = "tokio-macros"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "tokio-native-tls" name = "tokio-native-tls"
version = "0.3.1" version = "0.3.1"

View file

@ -14,8 +14,6 @@ keywords = [
"tokio", "tokio",
] ]
[dev-dependencies]
tokio = { version = "1.45.0", features = ["fs", "rt", "rt-multi-thread", "macros"] }
[dependencies] [dependencies]
bytes = "1.10.1" bytes = "1.10.1"

View file

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

View file

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