diff --git a/CHANGELOG.md b/CHANGELOG.md index 332e873..4dacfa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 2.0.0 + +* Replace Decimal export with rust_decimal re-export. +* Replace ByteSize export with bytesize re-export. +* Fix doc and tes references to the above exports. +* Remove explicit crate links where unnecessary. + ## 1.1.0 * Correctly handle Hetzner API returning `null` server ips as an empty vec [#5](https://github.com/MathiasPius/hrobot-rs/issues/5) diff --git a/Cargo.toml b/Cargo.toml index f8f4f4f..bce2224 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "hrobot" description = "Unofficial Hetzner Robot API client" keywords = ["hetzner", "robot", "api", "client", "async"] repository = "https://github.com/MathiasPius/hrobot-rs" -version = "1.1.0" +version = "2.0.0" license = "MIT" edition = "2021" diff --git a/src/api/ip.rs b/src/api/ip.rs index 6c9e396..8f04e5c 100644 --- a/src/api/ip.rs +++ b/src/api/ip.rs @@ -119,7 +119,7 @@ impl AsyncRobot { /// # Example /// ```rust,no_run /// # use hrobot::api::ip::TrafficWarnings; - /// # use hrobot::ByteSize; + /// # use hrobot::bytesize::ByteSize; /// # #[tokio::main] /// # async fn main() { /// let robot = hrobot::AsyncRobot::default(); diff --git a/src/api/ordering/mod.rs b/src/api/ordering/mod.rs index ab99183..7696c90 100644 --- a/src/api/ordering/mod.rs +++ b/src/api/ordering/mod.rs @@ -142,7 +142,7 @@ impl AsyncRobot { /// # Example /// ```rust,no_run /// # use hrobot::api::ordering::Location; - /// # use hrobot::Decimal; + /// # use hrobot::rust_decimal::Decimal; /// # #[tokio::main] /// # async fn main() { /// # let _ = dotenvy::dotenv().ok(); diff --git a/src/api/subnet.rs b/src/api/subnet.rs index 3fd5b35..556a6c5 100644 --- a/src/api/subnet.rs +++ b/src/api/subnet.rs @@ -123,7 +123,7 @@ impl AsyncRobot { /// # Example /// ```rust,no_run /// # use hrobot::api::ip::TrafficWarnings; - /// # use hrobot::ByteSize; + /// # use hrobot::bytesize::ByteSize; /// # #[tokio::main] /// # async fn main() { /// let robot = hrobot::AsyncRobot::default(); diff --git a/src/api/vswitch.rs b/src/api/vswitch.rs index 9aacf2d..054559e 100644 --- a/src/api/vswitch.rs +++ b/src/api/vswitch.rs @@ -282,7 +282,7 @@ impl PartialEq for VlanId { /// Uniquely identifies a vSwitch. /// /// Simple wrapper around a u32, to avoid confusion with other simple integer-based IDs -/// such as [`VlanId`](crate::api::vswitch::VlanId) and to make it intuitive what kind +/// such as [`VlanId`] and to make it intuitive what kind /// of argument you need to give to functions. /// /// Using a plain integer means it isn't clear what the argument is, is it a counter of @@ -462,7 +462,7 @@ pub struct CloudNetwork { /// Cloud Netowrk unique ID. /// -/// Simple wrapper around a u32, to avoid confusion with for example [`VSwitchId`](crate::api::vswitch::VSwitchId) +/// Simple wrapper around a u32, to avoid confusion with for example [`VSwitchId`] #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct CloudNetworkId(pub u32); diff --git a/src/lib.rs b/src/lib.rs index 62f54f8..0da8054 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ //! `hrobot` is an unofficial asynchronous Rust client for interacting with the [Hetzner Robot API](https://robot.your-server.de/doc/webservice/en.html) //! -//! See the [`AsyncRobot`](crate::AsyncRobot) struct for a complete list of supported API Endpoints. +//! See the [`AsyncRobot`] struct for a complete list of supported API Endpoints. //! //! **Disclaimer:** the authors are not associated with Hetzner (except as customers), and the crate is in no way endorsed or supported by Hetzner Online GmbH. //! @@ -10,7 +10,7 @@ //! If you already have a Hetzner account, you can create one through the [Hetzner Robot](https://robot.your-server.de) web interface under [Settings/Preferences](https://robot.your-server.de/preferences/index). //! //! # Example -//! Here's a quick example showing how to instantiate the [`AsyncRobot`](crate::AsyncRobot) client object +//! Here's a quick example showing how to instantiate the [`AsyncRobot`] client object //! and fetching a list of all dedicated servers owned by the account identified by `username` //! ```rust,no_run //! use hrobot::*; @@ -45,7 +45,6 @@ overflowing_literals, path_statements, patterns_in_fns_without_body, - private_in_public, unconditional_recursion, unused, unused_allocation, @@ -69,7 +68,7 @@ mod client; mod conversion; mod urlencode; -pub use ::bytesize::ByteSize; -pub use ::rust_decimal::Decimal; +pub use ::bytesize; +pub use ::rust_decimal; pub use ::time; -pub use client::*; +pub use client::*; \ No newline at end of file