Skip to content

Commit 9e00a2b

Browse files
committed
chore: update doc strings
1 parent 3b23a97 commit 9e00a2b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/cli.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,19 @@ pub(crate) enum NetEditCmds {
385385
#[derive(Debug, Parser)]
386386
pub(crate) struct NetParams {
387387
#[clap(long)]
388+
/// Let ZeroTier modify the system's default route
388389
pub(crate) allow_default: Option<bool>,
389390

390391
#[clap(long)]
392+
/// Let ZeroTier modify the system's DNS settings
391393
pub(crate) allow_dns: Option<bool>,
392394

393395
#[clap(long)]
396+
/// Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918)
394397
pub(crate) allow_global: Option<bool>,
395398

396399
#[clap(long)]
400+
/// Let ZeroTier to manage IP addresses and Route assignments.
397401
pub(crate) allow_managed: Option<bool>,
398402

399403
#[clap(long)]
@@ -413,7 +417,7 @@ pub(crate) struct NetParams {
413417
pub(crate) id: Option<String>,
414418

415419
#[clap(long)]
416-
/// MAC address for the network
420+
/// MAC address for this network's interface
417421
pub(crate) mac: Option<String>,
418422

419423
#[clap(long)]

src/ztapi.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,12 @@ pub mod types {
151151

152152
#[derive(Serialize, Deserialize, Debug, Clone)]
153153
pub struct Network {
154-
#[doc = "Let ZeroTier modify the system's default route."]
155154
#[serde(rename = "allowDefault", default, skip_serializing_if = "Option::is_none")]
156155
pub allow_default: Option<bool>,
157-
#[doc = "Let ZeroTier modify the system's DNS settings."]
158156
#[serde(rename = "allowDNS", default, skip_serializing_if = "Option::is_none")]
159157
pub allow_dns: Option<bool>,
160-
#[doc = "Let ZeroTier manage IP addresses and Route assignments that aren't in private ranges (rfc1918)."]
161158
#[serde(rename = "allowGlobal", default, skip_serializing_if = "Option::is_none")]
162159
pub allow_global: Option<bool>,
163-
#[doc = "Let ZeroTier to manage IP addresses and Route assignments."]
164160
#[serde(rename = "allowManaged", default, skip_serializing_if = "Option::is_none")]
165161
pub allow_managed: Option<bool>,
166162
#[serde(rename = "assignedAddresses", default, skip_serializing_if = "Vec::is_empty")]
@@ -173,7 +169,6 @@ pub mod types {
173169
pub dns: Option<NetworkSubtype1Dns>,
174170
#[serde(default, skip_serializing_if = "Option::is_none")]
175171
pub id: Option<String>,
176-
#[doc = "MAC address for this network's interface."]
177172
#[serde(default, skip_serializing_if = "Option::is_none")]
178173
pub mac: Option<String>,
179174
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -373,6 +368,7 @@ impl Client {
373368
match status {
374369
StatusCode::OK => Ok(response),
375370
StatusCode::UNAUTHORIZED => anyhow::bail!("unauthorized request"),
371+
StatusCode::NOT_FOUND => anyhow::bail!("resource not found"),
376372
_ => anyhow::bail!("unexpected response: {}", status),
377373
}
378374
}

0 commit comments

Comments
 (0)