Note: I strongly suggest reviewing this commit in side-by-side mode.
Note: This commit fails CI due incorrect formatting. It is done
deliberately to simplify review process.
Previously, "set_draft_raw" function was used with "msg = None" only for
side-effect of removing current draft message in chat.
After draft removal functionality was factored into separate
"maybe_delete_draft" function, it is used directly in only call site,
which used to invoke "set_draft_raw" with optional message.
This function is private, and this refactoring does not change FFI
interface.
Note: This commit fails CI due incorrect formatting. It is done
deliberately to simplify review process.
* src/dc_mimefactory.rs(new): add factory method to have verbose
initialization of all (more than 10) MimeFactory fields only in one place.
* src/dc_mimefactory.rc(dc_mimefactory_load_msg, dc_mimefactory_load_mdn):
simplify code (and reduce linecount) using Mimefactory::new
* src/dc_mimefactory.rs(MimeFactory): change type of `loaded` field
* src/dc_mimefactory.rs(Loaded): new enum, describing possible
values of `loaded` field of `MimeFactory` structure
* src/dc_mimefactory.rs(dc_mimefactory_loaded_t): remove unused type alias
* src/job.rs(add_smtp_job): adjust call site by removing multiple casts
* src/dc_mimefactory.rs(dc_mimefactory_render): ditto
Replace named constants with enum to improve type-safety and make
exhausiveness checks possible.
Note, that since this enum never pass FFI border, its numeric values
does not need to be specified explicitly and can be left on compiler's
discretion.
Previously, this function accepted both key id (integer) and is_default
(boolean). If `is_default` flag was set, value `id` parameter wasn't
used. This commit compresses two argument into single `id: Option<i64>`.
For consistency with other tests that use example public and private
keys, replace use of `concat!` macro with `include_str!`. This way, key
data embedded into source with single line of code.
(@dignifiedquire and @hpk42)
- introduce rust-caching to python test runs
- skip release and ffi runs, they are check using python bindings
- shuffle files such that ci_scripts/ contains all the ci scripts
- partly parallelize python tox runs