Skip to content

Commit

Permalink
fix(cmd): allow to copy a configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Feb 24, 2023
1 parent 1588bef commit ed370b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clightningrpc-conf"
version = "0.0.1-alpha.6"
version = "0.0.1-alpha.7"
edition = "2021"
authors = ["Vincenzo Palazzo <[email protected]>"]
license = "CC0-1.0"
Expand Down
2 changes: 1 addition & 1 deletion conf/changelog.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package_name": "conf",
"version": "v0.0.1-alpha.6",
"version": "v0.0.1-alpha.7",
"api": {
"name": "github",
"repository": "laanwj/rust-clightning-rpc",
Expand Down
2 changes: 1 addition & 1 deletion conf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait SyncCLNConf {
/// core lightning configuration manager
/// that help to parser and create a core
/// lightning configuration with rust.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct CLNConf {
/// collection of field included
/// inside the conf file.
Expand Down
4 changes: 3 additions & 1 deletion conf/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ impl Parser {

fn read_and_split(&self) -> Result<Vec<Word>, ParsingError> {
let content = if !self.file.exist() && self.create_if_missing {
self.file.write("# core lightning configuration generated by coffe please do not edit this")?;
self.file.write(
"# core lightning configuration generated by coffe please do not edit this",
)?;
self.file.read()
} else {
self.file.read()
Expand Down

0 comments on commit ed370b8

Please sign in to comment.