Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Fix watcher type visibility, fix deprecated function usage. (#74)
Browse files Browse the repository at this point in the history
* Fix watcher type visability so these types can be used in other functions such as spawning on a new task.

* Fix deprecated function usage.
  • Loading branch information
dtzxporter committed Oct 20, 2022
1 parent baacb7a commit 22c5341
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client.rs
Expand Up @@ -42,7 +42,7 @@ pub struct TokenInterceptor {
impl TokenInterceptor {
fn new(token: Option<String>) -> Self {
Self {
token: token.map(|token: String| MetadataValue::from_str(&token).unwrap()),
token: token.map(|token: String| MetadataValue::try_from(&token).unwrap()),
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Expand Up @@ -32,7 +32,8 @@ pub use lease::{
};
pub use response_header::ResponseHeader;
pub use watch::{
Event, EventType, WatchCancelRequest, WatchCreateRequest, WatchInbound, WatchOp, WatchResponse,
Event, EventType, WatchCancelRequest, WatchCreateRequest, WatchInbound, WatchOp, WatchResponse, WatchStream,
WatchCanceler
};

pub use client::{Client, ClientConfig, Endpoint};
Expand Down

0 comments on commit 22c5341

Please sign in to comment.