summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/jt.rs (renamed from src/bin/jt2.rs)4
-rw-r--r--src/config.rs2
-rw-r--r--src/template.rs6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/jt2.rs b/src/bin/jt.rs
index a5760d8..11fc45d 100644
--- a/src/bin/jt2.rs
+++ b/src/bin/jt.rs
@@ -1,5 +1,5 @@
-use jt2::config::Configuration;
-use jt2::opt::{Opt, SubCommand};
+use jt::config::Configuration;
+use jt::opt::{Opt, SubCommand};
use structopt::StructOpt;
diff --git a/src/config.rs b/src/config.rs
index 655b835..03b54ce 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -8,7 +8,7 @@ use serde::Deserialize;
use std::default::Default;
use std::path::{Path, PathBuf};
-const APP: &str = "jt2";
+const APP: &str = "jt";
// The configuration file we read.
//
diff --git a/src/template.rs b/src/template.rs
index 41d2e04..cf05ab5 100644
--- a/src/template.rs
+++ b/src/template.rs
@@ -33,15 +33,15 @@ impl Templates {
}
pub fn new_draft(&self, context: &Context) -> Result<String, JournalError> {
- self.render("new_entry", &context)
+ self.render("new_entry", context)
}
pub fn new_topic(&self, context: &Context) -> Result<String, JournalError> {
- self.render("new_topic", &context)
+ self.render("new_topic", context)
}
fn render(&self, name: &str, context: &Context) -> Result<String, JournalError> {
- match self.tera.render(name, &context) {
+ match self.tera.render(name, context) {
Ok(s) => Ok(s),
Err(e) => match e.kind {
tera::ErrorKind::TemplateNotFound(x) => Err(JournalError::TemplateNotFound(x)),