diff --git a/src/constants.rs b/src/constants.rs index 6dea6fa41..e1eb5b835 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,3 +1,4 @@ +#![allow(non_camel_case_types)] //! Constants pub const DC_VERSION_STR: &'static [u8; 14] = b"1.0.0-alpha.3\x00"; diff --git a/src/dc_e2ee.rs b/src/dc_e2ee.rs index 0a49fdcdf..3232a9a91 100644 --- a/src/dc_e2ee.rs +++ b/src/dc_e2ee.rs @@ -34,6 +34,7 @@ use crate::x::*; // to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead. // some defaults #[derive(Clone)] +#[allow(non_camel_case_types)] pub struct dc_e2ee_helper_t { pub encryption_successfull: libc::c_int, pub cdata_to_free: *mut libc::c_void, diff --git a/src/dc_location.rs b/src/dc_location.rs index c9cf35f5e..23995e8fb 100644 --- a/src/dc_location.rs +++ b/src/dc_location.rs @@ -16,6 +16,7 @@ use crate::x::*; // location handling #[derive(Clone, Default)] +#[allow(non_camel_case_types)] pub struct dc_location { pub location_id: uint32_t, pub latitude: libc::c_double, @@ -47,6 +48,7 @@ impl dc_location { } #[derive(Clone)] +#[allow(non_camel_case_types)] pub struct dc_kml_t { pub addr: *mut libc::c_char, pub locations: *mut dc_array_t, diff --git a/src/dc_loginparam.rs b/src/dc_loginparam.rs index cee18c707..0cf5b0b53 100644 --- a/src/dc_loginparam.rs +++ b/src/dc_loginparam.rs @@ -4,6 +4,7 @@ use crate::context::Context; use crate::sql::Sql; #[derive(Default, Debug)] +#[allow(non_camel_case_types)] pub struct dc_loginparam_t { pub addr: String, pub mail_server: String, diff --git a/src/dc_mimefactory.rs b/src/dc_mimefactory.rs index 0baf0d653..2617c5dc3 100644 --- a/src/dc_mimefactory.rs +++ b/src/dc_mimefactory.rs @@ -26,6 +26,7 @@ use crate::x::*; #[derive(Copy, Clone)] #[repr(C)] +#[allow(non_camel_case_types)] pub struct dc_mimefactory_t<'a> { pub from_addr: *mut libc::c_char, pub from_displayname: *mut libc::c_char, @@ -49,6 +50,7 @@ pub struct dc_mimefactory_t<'a> { pub context: &'a Context, } +#[allow(non_camel_case_types)] pub type dc_mimefactory_loaded_t = libc::c_uint; pub const DC_MF_MDN_LOADED: dc_mimefactory_loaded_t = 2; pub const DC_MF_MSG_LOADED: dc_mimefactory_loaded_t = 1; diff --git a/src/dc_mimeparser.rs b/src/dc_mimeparser.rs index cebda216d..570b63a3c 100644 --- a/src/dc_mimeparser.rs +++ b/src/dc_mimeparser.rs @@ -42,6 +42,7 @@ pub struct dc_mimepart_t { * @class dc_mimeparser_t */ #[derive(Clone)] +#[allow(non_camel_case_types)] pub struct dc_mimeparser_t<'a> { pub parts: *mut carray, pub mimeroot: *mut mailmime, diff --git a/src/dc_saxparser.rs b/src/dc_saxparser.rs index 8ff380817..57e44fde2 100644 --- a/src/dc_saxparser.rs +++ b/src/dc_saxparser.rs @@ -12,10 +12,13 @@ pub struct dc_saxparser_t { } /* len is only informational, text is already null-terminated */ +#[allow(non_camel_case_types)] pub type dc_saxparser_text_cb_t = Option ()>; +#[allow(non_camel_case_types)] pub type dc_saxparser_endtag_cb_t = Option ()>; +#[allow(non_camel_case_types)] pub type dc_saxparser_starttag_cb_t = Option< unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: *mut *mut libc::c_char) -> (), >; diff --git a/src/dc_token.rs b/src/dc_token.rs index ebbe2748e..1dd4eccc1 100644 --- a/src/dc_token.rs +++ b/src/dc_token.rs @@ -3,6 +3,7 @@ use crate::dc_tools::*; use crate::sql; // Token namespaces +#[allow(non_camel_case_types)] pub type dc_tokennamespc_t = usize; pub const DC_TOKEN_AUTH: dc_tokennamespc_t = 110; pub const DC_TOKEN_INVITENUMBER: dc_tokennamespc_t = 100; diff --git a/src/lib.rs b/src/lib.rs index 85d5d8073..5048d1fd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,3 @@ -#![allow( - non_camel_case_types, - non_camel_case_types, -)] #![feature(c_variadic, ptr_wrapping_offset_from)] #[macro_use] diff --git a/src/types.rs b/src/types.rs index a376b7d30..3cf1043df 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1,3 +1,4 @@ +#![allow(non_camel_case_types)] use crate::constants::Event; use crate::context::Context;