From aaa1155c3fffb28899a366c198834e56118ef0b2 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 6 Sep 2018 11:57:07 +0000 Subject: [PATCH] Remove TODOs from README.md Tracking these through issues is better. Also, `rustfmt` only needs to be called on top-level files (see https://github.com/rust-lang-nursery/rustfmt/issues/2426). It does need to be called on every example, though, as those count as top-level files. Mention that signed GPG commits are preferred. Tree-SHA512: 5e4a308e71a6dd437a93f337820eb817185c235bb2796bcf28d91e1e45f91cbce5dc7e305e7adc7ee96c4292ab91fa89eb932a0b0007f98191740a9d15ddb03f --- README.md | 25 +++---------------------- examples/ex_1.rs | 6 +++++- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 0a8fc71..99a907d 100644 --- a/README.md +++ b/README.md @@ -58,30 +58,11 @@ Be aware that the API (of rust-clighting-rpc, but also that of c-lightning itself) is not finalized. This means that it may change from version to version and break your compile, sorry! -# To do - -- verify use of `i64` versus `u64` in API -- document low and high level handling -- document error handling -- reproducible functional test that exercises against actual lightning instances (regtest?) -- a better way to get at the data for failed payments - -``` -"code" : 205, "message" : "Could not find a route", "data" : ... -``` - - `data` could be parsed into a structure, but this depends on the kind of error - -- the API could make more use of enums where the possible values are known; for example the - `addresstype` parameter to `newaddr`, but also in returned structures. This has to be weighted - against flexibility, though, in case the API is extended later. - -- decide on `&str` versus `String` on high-level API (but at least make sure it is consistent) - -# Style guidelines +# Contributing guidelines - Four spaces -- Call `rustfmt src/*.rs` before committing +- Call `rustfmt src/lib.rs examples/*.rs` before committing +- If you can, GPG-sign at least your top commit when filing a PR # Credits diff --git a/examples/ex_1.rs b/examples/ex_1.rs index c9445fb..427736a 100644 --- a/examples/ex_1.rs +++ b/examples/ex_1.rs @@ -13,6 +13,10 @@ fn main() { println!("getinfo result: {:?}", client.getinfo().unwrap()); for style in &["perkb", "perkw"] { - println!("feerates {}: {:?}", style, client.feerates(style.to_string()).unwrap()); + println!( + "feerates {}: {:?}", + style, + client.feerates(style.to_string()).unwrap() + ); } }