diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-11-14 10:10:27 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-11-14 10:10:27 +0000 |
commit | fd0a5c81617dbbf8898ef88b273fedeb4cbe118f (patch) | |
tree | b25cbd99647b67bfe1ef86193581a26e7700434d | |
parent | 3f3fd8faa4b8c6913609fe463a16b4bff0c7fd23 (diff) | |
parent | 5f9d36c3da1640010e09caa5156d49617c8890b6 (diff) | |
download | jt2-fd0a5c81617dbbf8898ef88b273fedeb4cbe118f.tar.gz |
Merge branch 'chore' into 'main'
fix: use "authors" field in subplot
See merge request larswirzenius/jt!34
-rw-r--r-- | jt.subplot | 4 | ||||
-rw-r--r-- | src/config.rs | 2 | ||||
-rw-r--r-- | src/git.rs | 2 | ||||
-rw-r--r-- | src/journal.rs | 2 |
4 files changed, 6 insertions, 4 deletions
@@ -1,5 +1,7 @@ title: "jt—a journalling tool" -author: Lars Wirzenius and Daniel Silverstone +authors: + - Lars Wirzenius + - Daniel Silverstone markdowns: - jt.md bindings: diff --git a/src/config.rs b/src/config.rs index 03b54ce..6995e24 100644 --- a/src/config.rs +++ b/src/config.rs @@ -24,7 +24,7 @@ struct InputConfiguration { impl InputConfiguration { fn read(filename: &Path) -> Result<Self, JournalError> { - let text = std::fs::read(&filename) + let text = std::fs::read(filename) .map_err(|err| JournalError::ReadConfig(filename.to_path_buf(), err))?; let config = serde_yaml::from_slice(&text) .map_err(|err| JournalError::ConfigSyntax(filename.to_path_buf(), err))?; @@ -49,7 +49,7 @@ pub fn commit<P: AsRef<Path>>(dirname: P, msg: &str) -> Result<(), JournalError> debug!("git commit in {}", dirname.display()); let output = Command::new("git") - .args(&["commit", "-m", msg]) + .args(["commit", "-m", msg]) .current_dir(dirname) .output() .map_err(|err| JournalError::SpawnGit(dirname.to_path_buf(), err))?; diff --git a/src/journal.rs b/src/journal.rs index 270bb19..44d632f 100644 --- a/src/journal.rs +++ b/src/journal.rs @@ -206,7 +206,7 @@ impl Journal { let pathname = topic_path(self.dirname(), path); let parent = pathname.parent().unwrap(); if !parent.is_dir() { - std::fs::create_dir_all(&parent) + std::fs::create_dir_all(parent) .map_err(|err| JournalError::CreateDirectory(parent.to_path_buf(), err))?; } |