Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
feat: serialize a configuration as JSON
Lars Wirzenius committed 1 year ago
commit 969f4fb2fb4786364a0f6a273a1eafe95a9f6e10
parent fc5a466426abc032a065364ea7b27be66def76be
1 file changed +5 -0
modified src/config.rs
@@ -41,7 +41,12 @@ impl Config {
    pub fn db(&self) -> &Path {
        &self.db
    }
+

+
    pub fn to_json(&self) -> String {
+
        serde_json::to_string_pretty(self).expect("serialize config to JSON")
+
    }
}
+

impl fmt::Debug for Adapter {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(