mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 23:52:11 +03:00
This creates a specific type for blobs, with well defined conversions at the borders. It also introduces a strong type for the Param::File value since that param is often used used by the public API to set filenames using absolute paths, but then core changes the param to a blob before it gets to the database. This eliminates a few more functions with very mallable C-like arguments behaviour which combine a number of operations in one. Because blob filenames are stored so often in arbitrary strings this does add more code when receiving those, until the storage is fixed. File name sanitisation is now deletated to the sanitize-filename crate which should do a slightly better job at this.
76 lines
1.3 KiB
Rust
76 lines
1.3 KiB
Rust
#![deny(clippy::correctness, missing_debug_implementations)]
|
|
// TODO: make all of these errors, such that clippy actually passes.
|
|
#![warn(clippy::all, clippy::perf, clippy::not_unsafe_ptr_arg_deref)]
|
|
// This is nice, but for now just annoying.
|
|
#![allow(clippy::unreadable_literal)]
|
|
#![feature(ptr_wrapping_offset_from)]
|
|
|
|
#[macro_use]
|
|
extern crate failure_derive;
|
|
#[macro_use]
|
|
extern crate num_derive;
|
|
#[macro_use]
|
|
extern crate smallvec;
|
|
#[macro_use]
|
|
extern crate rusqlite;
|
|
extern crate strum;
|
|
#[macro_use]
|
|
extern crate strum_macros;
|
|
#[macro_use]
|
|
extern crate jetscii;
|
|
#[macro_use]
|
|
extern crate debug_stub_derive;
|
|
|
|
#[macro_use]
|
|
mod log;
|
|
#[macro_use]
|
|
pub mod error;
|
|
|
|
pub(crate) mod events;
|
|
pub use events::*;
|
|
|
|
mod aheader;
|
|
pub mod blob;
|
|
pub mod chat;
|
|
pub mod chatlist;
|
|
pub mod config;
|
|
pub mod configure;
|
|
pub mod constants;
|
|
pub mod contact;
|
|
pub mod context;
|
|
mod e2ee;
|
|
mod imap;
|
|
pub mod imex;
|
|
pub mod job;
|
|
mod job_thread;
|
|
pub mod key;
|
|
pub mod keyring;
|
|
pub mod location;
|
|
mod login_param;
|
|
pub mod lot;
|
|
pub mod message;
|
|
mod mimefactory;
|
|
pub mod oauth2;
|
|
mod param;
|
|
pub mod peerstate;
|
|
pub mod pgp;
|
|
pub mod qr;
|
|
pub mod securejoin;
|
|
mod smtp;
|
|
pub mod sql;
|
|
pub mod stock;
|
|
mod token;
|
|
#[macro_use]
|
|
mod wrapmime;
|
|
|
|
pub mod dc_array;
|
|
mod dc_dehtml;
|
|
pub mod dc_mimeparser;
|
|
pub mod dc_receive_imf;
|
|
mod dc_simplify;
|
|
mod dc_strencode;
|
|
pub mod dc_tools;
|
|
|
|
#[cfg(test)]
|
|
mod test_utils;
|