diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2022-12-18 10:10:05 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2022-12-18 10:10:05 +0100 |
commit | 5288322627c4fd69b963405142d270b6ca397471 (patch) | |
tree | 0931eb92587fafe05a3d3140973708d3eb1bd940 | |
parent | 8a2ff6ad1c913d58dfd5cad4a33f2ddef8ea43e6 (diff) |
Format code with latest rustfmt
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | src/annotation.rs | 5 | ||||
-rw-r--r-- | src/import.rs | 9 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/annotation.rs b/src/annotation.rs index f855d52..4532b39 100644 --- a/src/annotation.rs +++ b/src/annotation.rs @@ -20,10 +20,7 @@ pub struct Annotation { impl Annotation { /// Create a new Annotation object pub fn new(entry: Date, description: String) -> Annotation { - Annotation { - entry, - description, - } + Annotation { entry, description } } /// Get the entry date diff --git a/src/import.rs b/src/import.rs index 9ebdd8b..209689d 100644 --- a/src/import.rs +++ b/src/import.rs @@ -37,11 +37,7 @@ pub fn import_tasks<BR: BufRead>(r: BR) -> Vec<Result<Task>> { let mut vt = Vec::new(); for line in r.lines() { if let Err(err) = line { - vt.push( - Err(err) - .context(EK::ReaderError) - .map_err(Error::from), - ); + vt.push(Err(err).context(EK::ReaderError).map_err(Error::from)); continue; } // Unwrap is safe because of continue above @@ -167,7 +163,8 @@ fn test_one_single() { assert_eq!(task.description(), "some description"); assert_eq!(*task.entry(), mkdate("20150619T165438Z")); assert_eq!( - *task.uuid(), Uuid::parse_str("8ca953d5-18b4-4eb9-bd56-18f2e5b752f0").unwrap() + *task.uuid(), + Uuid::parse_str("8ca953d5-18b4-4eb9-bd56-18f2e5b752f0").unwrap() ); assert_eq!(task.modified(), Some(&mkdate("20160327T164007Z"))); assert_eq!(task.project(), Some(&String::from("someproject"))); |