From 6e1619aa18f9fc40d5b9b7ed6ee9a1f9856f4444 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Fri, 28 Jun 2024 00:33:45 +0900 Subject: [PATCH] fmt --- src/cmd_args.rs | 4 +--- src/cmd_backup.rs | 2 +- src/storages.rs | 2 +- src/storages/directory.rs | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/cmd_args.rs b/src/cmd_args.rs index 28a41ec..70a8033 100644 --- a/src/cmd_args.rs +++ b/src/cmd_args.rs @@ -57,9 +57,7 @@ pub(crate) enum Commands { Check {}, /// Generate completion script. - Completion { - shell: clap_complete::Shell, - } + Completion { shell: clap_complete::Shell }, } #[derive(Args, Debug)] diff --git a/src/cmd_backup.rs b/src/cmd_backup.rs index bcfd42b..7ae9767 100644 --- a/src/cmd_backup.rs +++ b/src/cmd_backup.rs @@ -216,7 +216,7 @@ fn write_backups_list( None => { let style = Style::new().red(); (style.apply_to("---".to_string()), style) - }, + } }; if !longprint { writeln!( diff --git a/src/storages.rs b/src/storages.rs index 7562b0e..4031d61 100644 --- a/src/storages.rs +++ b/src/storages.rs @@ -1,6 +1,5 @@ //! Manipulates storages. -use console::{style, Style, StyledObject}; use crate::devices; use crate::storages::{ directory::Directory, online_storage::OnlineStorage, @@ -8,6 +7,7 @@ use crate::storages::{ }; use anyhow::{anyhow, Context, Result}; use clap::ValueEnum; +use console::{style, Style, StyledObject}; use core::panic; use serde::{Deserialize, Serialize}; use std::{collections::BTreeMap, fmt, fs, io, path}; diff --git a/src/storages/directory.rs b/src/storages/directory.rs index 7887c7b..4cd7803 100644 --- a/src/storages/directory.rs +++ b/src/storages/directory.rs @@ -180,9 +180,7 @@ mod test { local_infos, ); let mut storages = Storages::new(); - storages - .add(storages::Storage::Physical(physical)) - .unwrap(); + storages.add(storages::Storage::Physical(physical)).unwrap(); storages.add(Storage::SubDirectory(directory)).unwrap(); // assert_eq!(directory.name(), "test_name"); assert_eq!(