Override non_camel_case_types warning on per-declaration basis

This commit is contained in:
Dmitry Bogatov
2019-07-28 01:58:12 +00:00
committed by Floris Bruynooghe
parent c6ccfd824e
commit 669ed0e0df
10 changed files with 13 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
#![allow(non_camel_case_types)]
//! Constants //! Constants
pub const DC_VERSION_STR: &'static [u8; 14] = b"1.0.0-alpha.3\x00"; pub const DC_VERSION_STR: &'static [u8; 14] = b"1.0.0-alpha.3\x00";

View File

@@ -34,6 +34,7 @@ use crate::x::*;
// to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead. // to get the netto sizes, we subtract 1 mb header-overhead and the base64-overhead.
// some defaults // some defaults
#[derive(Clone)] #[derive(Clone)]
#[allow(non_camel_case_types)]
pub struct dc_e2ee_helper_t { pub struct dc_e2ee_helper_t {
pub encryption_successfull: libc::c_int, pub encryption_successfull: libc::c_int,
pub cdata_to_free: *mut libc::c_void, pub cdata_to_free: *mut libc::c_void,

View File

@@ -16,6 +16,7 @@ use crate::x::*;
// location handling // location handling
#[derive(Clone, Default)] #[derive(Clone, Default)]
#[allow(non_camel_case_types)]
pub struct dc_location { pub struct dc_location {
pub location_id: uint32_t, pub location_id: uint32_t,
pub latitude: libc::c_double, pub latitude: libc::c_double,
@@ -47,6 +48,7 @@ impl dc_location {
} }
#[derive(Clone)] #[derive(Clone)]
#[allow(non_camel_case_types)]
pub struct dc_kml_t { pub struct dc_kml_t {
pub addr: *mut libc::c_char, pub addr: *mut libc::c_char,
pub locations: *mut dc_array_t, pub locations: *mut dc_array_t,

View File

@@ -4,6 +4,7 @@ use crate::context::Context;
use crate::sql::Sql; use crate::sql::Sql;
#[derive(Default, Debug)] #[derive(Default, Debug)]
#[allow(non_camel_case_types)]
pub struct dc_loginparam_t { pub struct dc_loginparam_t {
pub addr: String, pub addr: String,
pub mail_server: String, pub mail_server: String,

View File

@@ -26,6 +26,7 @@ use crate::x::*;
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
#[repr(C)] #[repr(C)]
#[allow(non_camel_case_types)]
pub struct dc_mimefactory_t<'a> { pub struct dc_mimefactory_t<'a> {
pub from_addr: *mut libc::c_char, pub from_addr: *mut libc::c_char,
pub from_displayname: *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, pub context: &'a Context,
} }
#[allow(non_camel_case_types)]
pub type dc_mimefactory_loaded_t = libc::c_uint; pub type dc_mimefactory_loaded_t = libc::c_uint;
pub const DC_MF_MDN_LOADED: dc_mimefactory_loaded_t = 2; pub const DC_MF_MDN_LOADED: dc_mimefactory_loaded_t = 2;
pub const DC_MF_MSG_LOADED: dc_mimefactory_loaded_t = 1; pub const DC_MF_MSG_LOADED: dc_mimefactory_loaded_t = 1;

View File

@@ -42,6 +42,7 @@ pub struct dc_mimepart_t {
* @class dc_mimeparser_t * @class dc_mimeparser_t
*/ */
#[derive(Clone)] #[derive(Clone)]
#[allow(non_camel_case_types)]
pub struct dc_mimeparser_t<'a> { pub struct dc_mimeparser_t<'a> {
pub parts: *mut carray, pub parts: *mut carray,
pub mimeroot: *mut mailmime, pub mimeroot: *mut mailmime,

View File

@@ -12,10 +12,13 @@ pub struct dc_saxparser_t {
} }
/* len is only informational, text is already null-terminated */ /* len is only informational, text is already null-terminated */
#[allow(non_camel_case_types)]
pub type dc_saxparser_text_cb_t = pub type dc_saxparser_text_cb_t =
Option<unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: libc::c_int) -> ()>; Option<unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: libc::c_int) -> ()>;
#[allow(non_camel_case_types)]
pub type dc_saxparser_endtag_cb_t = pub type dc_saxparser_endtag_cb_t =
Option<unsafe fn(_: *mut libc::c_void, _: *const libc::c_char) -> ()>; Option<unsafe fn(_: *mut libc::c_void, _: *const libc::c_char) -> ()>;
#[allow(non_camel_case_types)]
pub type dc_saxparser_starttag_cb_t = Option< pub type dc_saxparser_starttag_cb_t = Option<
unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: *mut *mut libc::c_char) -> (), unsafe fn(_: *mut libc::c_void, _: *const libc::c_char, _: *mut *mut libc::c_char) -> (),
>; >;

View File

@@ -3,6 +3,7 @@ use crate::dc_tools::*;
use crate::sql; use crate::sql;
// Token namespaces // Token namespaces
#[allow(non_camel_case_types)]
pub type dc_tokennamespc_t = usize; pub type dc_tokennamespc_t = usize;
pub const DC_TOKEN_AUTH: dc_tokennamespc_t = 110; pub const DC_TOKEN_AUTH: dc_tokennamespc_t = 110;
pub const DC_TOKEN_INVITENUMBER: dc_tokennamespc_t = 100; pub const DC_TOKEN_INVITENUMBER: dc_tokennamespc_t = 100;

View File

@@ -1,7 +1,3 @@
#![allow(
non_camel_case_types,
non_camel_case_types,
)]
#![feature(c_variadic, ptr_wrapping_offset_from)] #![feature(c_variadic, ptr_wrapping_offset_from)]
#[macro_use] #[macro_use]

View File

@@ -1,3 +1,4 @@
#![allow(non_camel_case_types)]
use crate::constants::Event; use crate::constants::Event;
use crate::context::Context; use crate::context::Context;