Skip to content

Commit 28e35bc

Browse files
committed
rust 1.0.3
1 parent 244d646 commit 28e35bc

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "xnode-deployer"
33
description = "Deploy new Xnodes on several hardware providers"
4-
version = "1.0.2"
4+
version = "1.0.3"
55
edition = "2024"
66
repository = "https://github.com/Openmesh-Network/xnode-deployer"
77
license = "MIT"
@@ -12,3 +12,8 @@ reqwest = { version = "0.12", features = ["json"] }
1212
serde = { version = "1.0", features = ["derive"] }
1313
serde_json = "1.0"
1414
tokio = "1"
15+
16+
[features]
17+
default = [] # ["all"]
18+
all = ["hivelocity"]
19+
hivelocity = []

rust/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use serde::{Deserialize, Serialize};
22

3-
mod hivelocity;
43
mod utils;
5-
6-
pub use hivelocity::*;
74
pub use utils::{Error, XnodeDeployerError};
85

6+
#[cfg(feature = "hivelocity")]
7+
pub mod hivelocity;
8+
99
#[derive(Serialize, Deserialize, Debug)]
1010
pub struct DeployInput {
1111
pub xnode_owner: Option<String>,

rust/src/utils/error.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::fmt::Display;
22

3-
use crate::HivelocityError;
3+
#[cfg(feature = "hivelocity")]
4+
use crate::hivelocity::HivelocityError;
45

56
#[derive(Debug)]
67
pub enum Error {
@@ -21,13 +22,17 @@ impl Display for XnodeDeployerError {
2122

2223
#[derive(Debug)]
2324
pub enum XnodeDeployerErrorInner {
25+
Default,
26+
#[cfg(feature = "hivelocity")]
2427
HivelocityError(HivelocityError),
2528
}
2629

2730
impl Display for XnodeDeployerErrorInner {
2831
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2932
f.write_str(
3033
match self {
34+
XnodeDeployerErrorInner::Default => "".to_string(),
35+
#[cfg(feature = "hivelocity")]
3136
XnodeDeployerErrorInner::HivelocityError(e) => e.to_string(),
3237
}
3338
.as_str(),

0 commit comments

Comments
 (0)