Skip to content

Commit

Permalink
bump dependencies (#34)
Browse files Browse the repository at this point in the history
* bump dependencies

Signed-off-by: Asone <nelson@herbin.info>

* update: use map instead of and_then when creating lazy connection

Signed-off-by: Asone <nelson@herbin.info>
  • Loading branch information
Asone authored Jun 2, 2022
1 parent 70ecf85 commit d1595d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ license = "MIT"
name = "lnd"

[dependencies]
tonic = { version = "0.6", features = ["transport", "codegen", "prost"], default-features = false }
prost = { version = "0.9", default-features = false }
tonic = { version = "0.7.2", features = ["transport", "codegen", "prost"], default-features = false }
prost = { version = "0.10.4", default-features = false }
openssl = { version = "0.10", default-features = false }
hyper = { version = "0.14", default-features = false }
hyper-openssl = { version = "0.9", default-features = false }
hex = { version = "0.4", features = ["std"], default-features = false }
thiserror = { version = "1.0", default-features = false }

[build-dependencies]
tonic-build = "0.6"
tonic-build = "0.7.2"
1 change: 0 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ fn main() -> Result<(), std::io::Error> {
tonic_build::configure()
.build_server(false)
.out_dir(BUILD_DIR)
.format(false)
.compile(&PROTOS, &[PROTOS_NS])
}
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl Lnd {
Lnd::connector(certificate_bytes).map_err(LndConnectError::Connector)?;

let transport = tonic::transport::Endpoint::new(destination)
.and_then(move |d| d.connect_with_connector_lazy(https_connector))
.map(move |d| d.connect_with_connector_lazy(https_connector))
.map_err(LndConnectError::Transport)?;

Ok(Lnd::build(transport, LndInterceptor::noop()))
Expand Down Expand Up @@ -142,7 +142,7 @@ struct LndInterceptor {

impl LndInterceptor {
fn macaroon(bytes: &[u8]) -> Result<Self, InvalidMetadataValue> {
let macaroon = Some(MetadataValue::from_str(&hex::encode(bytes))?);
let macaroon = Some(MetadataValue::try_from(&hex::encode(bytes))?);
Ok(Self { macaroon })
}

Expand Down

0 comments on commit d1595d1

Please sign in to comment.