summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-11-14 10:10:27 +0000
committerLars Wirzenius <liw@liw.fi>2022-11-14 10:10:27 +0000
commitfd0a5c81617dbbf8898ef88b273fedeb4cbe118f (patch)
treeb25cbd99647b67bfe1ef86193581a26e7700434d
parent3f3fd8faa4b8c6913609fe463a16b4bff0c7fd23 (diff)
parent5f9d36c3da1640010e09caa5156d49617c8890b6 (diff)
downloadjt2-fd0a5c81617dbbf8898ef88b273fedeb4cbe118f.tar.gz
Merge branch 'chore' into 'main'
fix: use "authors" field in subplot See merge request larswirzenius/jt!34
-rw-r--r--jt.subplot4
-rw-r--r--src/config.rs2
-rw-r--r--src/git.rs2
-rw-r--r--src/journal.rs2
4 files changed, 6 insertions, 4 deletions
diff --git a/jt.subplot b/jt.subplot
index 1bf40a8..ea3f1b2 100644
--- a/jt.subplot
+++ b/jt.subplot
@@ -1,5 +1,7 @@
title: "jt&mdash;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))?;
diff --git a/src/git.rs b/src/git.rs
index 9aa8a52..5bb53f0 100644
--- a/src/git.rs
+++ b/src/git.rs
@@ -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))?;
}