Skip to content

Commit

Permalink
Remove additional empty line when output option is not specified (#11)
Browse files Browse the repository at this point in the history
* Replace println with print

* Fix typos
  • Loading branch information
scintillavoy authored Jul 5, 2024
1 parent 3799556 commit 4554d2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct Opt {
register_glob: Option<String>,

#[structopt(short, long)]
/// Make error output verobse
/// Make error output verbose.
verbose: bool,
}

Expand All @@ -55,7 +55,7 @@ fn main() -> Result<(), Box<dyn Error>> {
match opt.register_glob {
Some(pattern) => {
if opt.verbose {
eprintln!("Registring templates matching to {:?}", pattern);
eprintln!("Registering templates matching to {:?}", pattern);
}
register_templates_from_pattern(&mut reg, pattern)?;
}
Expand All @@ -73,7 +73,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let text = reg.render_template(&template, &data)?;
match opt.output {
Some(path) => fs::write(path, text)?,
None => println!("{}", text),
None => print!("{}", text),
};

Ok(())
Expand Down

0 comments on commit 4554d2a

Please sign in to comment.