rename jobs to make "rg Markseen" and other searches for the job enum produce all places dealing with the enum

This commit is contained in:
holger krekel
2019-11-28 16:38:34 +01:00
committed by Alexander Krotov
parent 430d4e5f6e
commit f87cb4231c
4 changed files with 24 additions and 27 deletions

View File

@@ -45,9 +45,8 @@ pub fn dc_is_configured(context: &Context) -> bool {
/*******************************************************************************
* Configure JOB
******************************************************************************/
// the other dc_job_do_DC_JOB_*() functions are declared static in the c-file
#[allow(non_snake_case, unused_must_use)]
pub fn dc_job_do_DC_JOB_CONFIGURE_IMAP(context: &Context) {
pub fn JobConfigureImap(context: &Context) {
if !context.sql.is_open() {
error!(context, "Cannot configure, database not opened.",);
progress!(context, 0);
@@ -601,7 +600,7 @@ pub fn read_autoconf_file(context: &Context, url: &str) -> Option<String> {
mod tests {
use crate::config::*;
use crate::configure::dc_job_do_DC_JOB_CONFIGURE_IMAP;
use crate::configure::JobConfigureImap;
use crate::test_utils::*;
#[test]
@@ -611,6 +610,6 @@ mod tests {
.set_config(Config::Addr, Some("probably@unexistant.addr"))
.unwrap();
t.ctx.set_config(Config::MailPw, Some("123456")).unwrap();
dc_job_do_DC_JOB_CONFIGURE_IMAP(&t.ctx);
JobConfigureImap(&t.ctx);
}
}