Skip to content

Commit 5ee1d18

Browse files
committed
format
1 parent 5e8c607 commit 5ee1d18

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

src/cli.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use anyhow::Result;
12
use std::borrow::ToOwned;
23
use std::env;
3-
use anyhow::Result;
44
use std::fs;
55
use std::io;
66
use std::io::{Read, Write};
@@ -75,7 +75,9 @@ pub fn build_index(outfile: &path::Path, dir: &path::Path) -> Result<()> {
7575
})?;
7676

7777
if errors {
78-
Err(anyhow!("Several errors happened while generating the index."))
78+
Err(anyhow!(
79+
"Several errors happened while generating the index."
80+
))
7981
} else {
8082
Ok(())
8183
}

src/editor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use vobject;
77

88
use atomicwrites;
99

10+
use crate::cursive::CursiveExt;
1011
use cursive::theme;
1112
use cursive::theme::BaseColor::*;
1213
use cursive::theme::Color::*;
1314
use cursive::Cursive;
1415
use cursive::With;
15-
use crate::cursive::CursiveExt;
1616

1717
mod widgets;
1818

src/main.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#[macro_use]
22
extern crate anyhow;
33
use anyhow::Result;
4+
use clap::{Arg, Command};
45
use std::fs;
56
use std::io;
67
use std::io::{Read, Write};
7-
use clap::{Command, Arg};
88

99
use mates::cli;
1010
use mates::utils;
@@ -19,7 +19,11 @@ fn main() -> Result<()> {
1919
.subcommand(
2020
Command::new("mutt-query")
2121
.about("Search for contact, output is usable for mutt's query_command.")
22-
.arg(Arg::new("disable-empty-line").long("disable-empty-line").help("Disable printing an empty first line"))
22+
.arg(
23+
Arg::new("disable-empty-line")
24+
.long("disable-empty-line")
25+
.help("Disable printing an empty first line"),
26+
)
2327
.arg(Arg::new("query").required(true)),
2428
)
2529
.subcommand(
@@ -83,7 +87,8 @@ fn main() -> Result<()> {
8387
let contact = utils::Contact::generate(
8488
args.value_of("fullname"),
8589
args.value_of("email"),
86-
&config.vdir_path);
90+
&config.vdir_path,
91+
);
8792
contact.write_create()?;
8893
}
8994
Some(("add-email", _)) => {

0 commit comments

Comments
 (0)