1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#![deny(
    // The following are allowed by default lints according to
    // https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
    anonymous_parameters,
    bare_trait_objects,
    box_pointers,
    elided_lifetimes_in_paths,
    missing_copy_implementations,
    missing_debug_implementations,
    missing_docs,
    single_use_lifetimes,
    trivial_casts,
    trivial_numeric_casts,
    // unreachable_pub, // This lint conflicts with clippy::redundant_pub_crate
    unsafe_code,
    unstable_features,
    unused_extern_crates,
    unused_import_braces,
    unused_qualifications,
    unused_results,
    variant_size_differences,

    // Treat warnings as errors
    warnings,

    clippy::all,
    clippy::restriction,
    clippy::pedantic,
    clippy::nursery,
    clippy::cargo,
)]
#![allow(
    clippy::blanket_clippy_restriction_lints, // allow denying all clippy::restriction lints
    clippy::module_name_repetitions, // repeation of module name in a struct name is not big deal
    clippy::implicit_return, // This is rust style
    clippy::panic, // allow assert
)]

//! Traits for datenlord.
mod arithmetic;
mod conversion;

pub use crate::arithmetic::OverflowArithmetic;
pub use crate::conversion::{cast_to_mut_ptr, cast_to_ptr, Cast};