Rustfmt, Comment, move a little bit slower

This commit is contained in:
Hocuri
2020-10-12 16:05:18 +02:00
parent 36046f5f2c
commit db5cb45b9c
2 changed files with 9 additions and 9 deletions

View File

@@ -5,13 +5,6 @@ mod auto_outlook;
mod read_url; mod read_url;
mod server_params; mod server_params;
use anyhow::{bail, ensure, Context as _, Result};
use async_std::prelude::*;
use async_std::task;
use itertools::Itertools;
use job::Action;
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
use crate::config::Config; use crate::config::Config;
use crate::constants::*; use crate::constants::*;
use crate::context::Context; use crate::context::Context;
@@ -27,7 +20,14 @@ use crate::smtp::Smtp;
use crate::stock::StockMessage; use crate::stock::StockMessage;
use crate::EventType; use crate::EventType;
use crate::{chat, e2ee, provider}; use crate::{chat, e2ee, provider};
use anyhow::{bail, ensure, Context as _, Result};
use async_std::prelude::*;
use async_std::task;
use auto_mozilla::moz_autoconfigure; use auto_mozilla::moz_autoconfigure;
use auto_outlook::outlk_autodiscover;
use itertools::Itertools;
use job::Action;
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
use server_params::{expand_param_vector, ServerParams}; use server_params::{expand_param_vector, ServerParams};
impl Context { impl Context {
@@ -51,7 +51,7 @@ impl Context {
let cancel_channel = self.alloc_ongoing().await?; let cancel_channel = self.alloc_ongoing().await?;
let ctx2 = self.clone(); let ctx2 = self.clone();
let progress = ProgressHandler::new(20.0, move |p| { let progress = ProgressHandler::new(15.0, move |p| {
ctx2.emit_event(EventType::ConfigureProgress { ctx2.emit_event(EventType::ConfigureProgress {
progress: p, progress: p,
comment: None, comment: None,

View File

@@ -46,7 +46,7 @@ impl<F> ProgressHandler<F>
where where
F: 'static + Fn(usize) + Send, F: 'static + Fn(usize) + Send,
{ {
/// If step_fraction is e.g. 10, then every 100ms we will step by 1/10th of the remaining interval. /// If step_fraction is e.g. 15, then every 100ms we will step by 1/15th of the remaining interval.
/// The bigger this value, the slower the progress bar will move in the beginning. /// The bigger this value, the slower the progress bar will move in the beginning.
/// f is the function that is invoked when progress is made. /// f is the function that is invoked when progress is made.
pub fn new(step_fraction: f64, f: F) -> Self { pub fn new(step_fraction: f64, f: F) -> Self {