mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
Bunch of feedback: renames, simple functions, no cow
This commit is contained in:
@@ -19,7 +19,7 @@ use crate::message::Message;
|
||||
use crate::oauth2::dc_get_oauth2_addr;
|
||||
use crate::provider::{Protocol, Socket, UsernamePattern};
|
||||
use crate::smtp::Smtp;
|
||||
use crate::stock::{ConfigurationFailed, ErrorNoNetwork};
|
||||
use crate::stock_str;
|
||||
use crate::{chat, e2ee, provider};
|
||||
use crate::{config::Config, dc_tools::time};
|
||||
use crate::{
|
||||
@@ -127,14 +127,13 @@ impl Context {
|
||||
self,
|
||||
0,
|
||||
Some(
|
||||
ConfigurationFailed::stock_str(
|
||||
stock_str::configuration_failed(
|
||||
self,
|
||||
// We are using Anyhow's .context() and to show the
|
||||
// inner error, too, we need the {:#}:
|
||||
format!("{:#}", err),
|
||||
)
|
||||
.await
|
||||
.to_string()
|
||||
)
|
||||
);
|
||||
Err(err)
|
||||
@@ -591,7 +590,7 @@ async fn nicer_configuration_error(context: &Context, errors: Vec<ConfigurationE
|
||||
.iter()
|
||||
.all(|e| e.msg.to_lowercase().contains("could not resolve"))
|
||||
{
|
||||
return ErrorNoNetwork::stock_str(context).await.to_string();
|
||||
return stock_str::error_no_network(context).await;
|
||||
}
|
||||
|
||||
if errors.iter().all(|e| e.msg == first_err.msg) {
|
||||
|
||||
Reference in New Issue
Block a user