diff --git a/build/find_normal.rs b/build/find_normal.rs index 18078d8..ff8d4a8 100644 --- a/build/find_normal.rs +++ b/build/find_normal.rs @@ -22,12 +22,12 @@ pub fn probe_lua() -> PathBuf { let need_lua_lib = cfg!(any(not(feature = "module"), target_os = "windows")); - if include_dir != "" { + if !include_dir.is_empty() { if need_lua_lib { - if lib_dir == "" { + if lib_dir.is_empty() { panic!("LUA_LIB is not set"); } - if lua_lib == "" { + if lua_lib.is_empty() { panic!("LUA_LIB_NAME is not set"); } diff --git a/src/conversion.rs b/src/conversion.rs index 1f02899..789490f 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -1,3 +1,5 @@ +#![allow(clippy::wrong_self_convention)] + use std::borrow::Cow; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::ffi::{CStr, CString}; diff --git a/src/error.rs b/src/error.rs index 903b189..639cab9 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,5 @@ +#![allow(clippy::wrong_self_convention)] + use std::error::Error as StdError; use std::fmt; use std::io::Error as IoError; diff --git a/src/ffi/compat53.rs b/src/ffi/compat53.rs index 9c90aca..3d8af28 100644 --- a/src/ffi/compat53.rs +++ b/src/ffi/compat53.rs @@ -538,6 +538,7 @@ pub unsafe fn lua_stringtonumber(L: *mut lua_State, s: *const c_char) -> usize { 0 } +#[allow(clippy::branches_sharing_code)] pub unsafe fn lua_getextraspace(L: *mut lua_State) -> *mut c_void { use super::glue::LUA_EXTRASPACE; diff --git a/src/multi.rs b/src/multi.rs index 128122d..07f2fdc 100644 --- a/src/multi.rs +++ b/src/multi.rs @@ -1,3 +1,5 @@ +#![allow(clippy::wrong_self_convention)] + use std::iter::FromIterator; use std::ops::{Deref, DerefMut}; use std::result::Result as StdResult;