Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
docs: fixes failing doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Jun 3, 2015
1 parent ae9d448 commit eab280d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/request/builder/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ impl<'t> RequestBuilder<'t, response::Account> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.account().action("1234").retrieve() {
/// Ok(action) => println!("Action: {}", action),
Expand All @@ -28,7 +29,8 @@ impl<'t> RequestBuilder<'t, response::Account> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.account().action("1234").retrieve() {
/// Ok(action) => println!("Action: {}", action),
Expand Down
27 changes: 24 additions & 3 deletions src/request/builder/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,17 @@ impl<'t> RequestBuilder<'t, response::DnsRecords> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # use doapi::request::DnsRecord;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// # let record = DnsRecord {
/// # rec_type: "A".to_owned(),
/// # name: None,
/// # priority: None,
/// # port: None,
/// # data: None,
/// # weight: None,
/// # };
/// // ... domgr set up same as before
/// // ... assumes "record" is an instance of doapi::request::DnsRecord
/// match domgr.domain("super.com")
Expand Down Expand Up @@ -136,7 +146,17 @@ impl<'t> RequestBuilder<'t, response::DnsRecord> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # use doapi::request::DnsRecord;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// # let record = DnsRecord {
/// # rec_type: "A".to_owned(),
/// # name: None,
/// # priority: None,
/// # port: None,
/// # data: None,
/// # weight: None,
/// # };
/// // ... domgr set up same as before
/// // ... assumes "record" is an instance of doapi::request::DnsRecord
/// match domgr.domain("super.com")
Expand Down Expand Up @@ -173,7 +193,8 @@ impl<'t> RequestBuilder<'t, response::DnsRecord> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.domain("super.com")
/// .dns_record("1234")
Expand Down
12 changes: 8 additions & 4 deletions src/request/builder/domains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ impl<'t> RequestBuilder<'t, response::Domains> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.domains()
/// .create("super.com", "10.10.10.1")
Expand Down Expand Up @@ -45,7 +46,8 @@ impl<'t> RequestBuilder<'t, response::Domain> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.domain("super.com")
/// .delete()
Expand All @@ -71,7 +73,8 @@ impl<'t> RequestBuilder<'t, response::Domain> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.domains()
/// .create("super.com", "10.10.10.1")
Expand All @@ -94,7 +97,8 @@ impl<'t> RequestBuilder<'t, response::Domain> {
///
/// ```no_run
/// # use doapi::DoManager;
/// # let domgr = DoManager::with_auth("asfasdfasdf");
/// # use doapi::DoRequest;
/// # let domgr = DoManager::with_token("asfasdfasdf");
/// // ... domgr set up same as before
/// match domgr.domain("super.com")
/// .retrieve() {
Expand Down

0 comments on commit eab280d

Please sign in to comment.