summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 75091e1..8a9ad53 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -146,7 +146,7 @@ impl Consul {
&self,
host: &str,
idx: Option<usize>,
- ) -> Result<(ConsulNodeCatalog, usize)> {
+ ) -> Result<(Option<ConsulNodeCatalog>, usize)> {
debug!("watch_node {} {:?}", host, idx);
let url = match idx {
@@ -160,7 +160,7 @@ impl Consul {
None => bail!("X-Consul-Index header not found"),
};
- let resp: ConsulNodeCatalog = http.json().await?;
+ let resp: Option<ConsulNodeCatalog> = http.json().await?;
Ok((resp, new_idx))
}