Fix clippy warnings

This commit is contained in:
Alex Orlenko 2021-05-04 23:42:33 +01:00
parent 8e57e6fa5a
commit 2250421438
5 changed files with 10 additions and 3 deletions

View File

@ -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");
}

View File

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

View File

@ -1,3 +1,5 @@
#![allow(clippy::wrong_self_convention)]
use std::error::Error as StdError;
use std::fmt;
use std::io::Error as IoError;

View File

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

View File

@ -1,3 +1,5 @@
#![allow(clippy::wrong_self_convention)]
use std::iter::FromIterator;
use std::ops::{Deref, DerefMut};
use std::result::Result as StdResult;