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
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.
// 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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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;

View File

@@ -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,

View File

@@ -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<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 =
Option<unsafe fn(_: *mut libc::c_void, _: *const libc::c_char) -> ()>;
#[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) -> (),
>;

View File

@@ -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;

View File

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

View File

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