mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 22:00:31 +00:00
fix: resolve clippy warnings and format code
This commit is contained in:
@@ -8,17 +8,12 @@ use indicatif::{ProgressBar, ProgressStyle};
|
||||
use tracing::{info, warn};
|
||||
|
||||
/// Migration options
|
||||
#[derive(Default)]
|
||||
pub struct MigrateOptions {
|
||||
/// If true, show what would be migrated without copying
|
||||
pub dry_run: bool,
|
||||
}
|
||||
|
||||
impl Default for MigrateOptions {
|
||||
fn default() -> Self {
|
||||
Self { dry_run: false }
|
||||
}
|
||||
}
|
||||
|
||||
/// Migration statistics
|
||||
#[derive(Debug, Default)]
|
||||
pub struct MigrateStats {
|
||||
@@ -64,7 +59,9 @@ pub async fn migrate(
|
||||
let pb = ProgressBar::new(keys.len() as u64);
|
||||
pb.set_style(
|
||||
ProgressStyle::default_bar()
|
||||
.template("{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {pos}/{len} ({eta})")
|
||||
.template(
|
||||
"{spinner:.green} [{elapsed_precise}] [{bar:40.cyan/blue}] {pos}/{len} ({eta})",
|
||||
)
|
||||
.expect("Invalid progress bar template")
|
||||
.progress_chars("#>-"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user