Skip to content

Commit

Permalink
Update and bump version to 2.0.0.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MathiasPius committed Nov 3, 2023
1 parent b18f45d commit 8d6864a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/api/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/api/ordering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/api/subnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/api/vswitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl PartialEq<u16> 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
Expand Down Expand Up @@ -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);

Expand Down
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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.
//!
Expand All @@ -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::*;
Expand Down Expand Up @@ -45,7 +45,6 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
unconditional_recursion,
unused,
unused_allocation,
Expand All @@ -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::*;

0 comments on commit 8d6864a

Please sign in to comment.