Fix clippy warnings
This commit is contained in:
parent
8e57e6fa5a
commit
2250421438
|
@ -22,12 +22,12 @@ pub fn probe_lua() -> PathBuf {
|
||||||
|
|
||||||
let need_lua_lib = cfg!(any(not(feature = "module"), target_os = "windows"));
|
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 need_lua_lib {
|
||||||
if lib_dir == "" {
|
if lib_dir.is_empty() {
|
||||||
panic!("LUA_LIB is not set");
|
panic!("LUA_LIB is not set");
|
||||||
}
|
}
|
||||||
if lua_lib == "" {
|
if lua_lib.is_empty() {
|
||||||
panic!("LUA_LIB_NAME is not set");
|
panic!("LUA_LIB_NAME is not set");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(clippy::wrong_self_convention)]
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
|
||||||
use std::ffi::{CStr, CString};
|
use std::ffi::{CStr, CString};
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(clippy::wrong_self_convention)]
|
||||||
|
|
||||||
use std::error::Error as StdError;
|
use std::error::Error as StdError;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::Error as IoError;
|
use std::io::Error as IoError;
|
||||||
|
|
|
@ -538,6 +538,7 @@ pub unsafe fn lua_stringtonumber(L: *mut lua_State, s: *const c_char) -> usize {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::branches_sharing_code)]
|
||||||
pub unsafe fn lua_getextraspace(L: *mut lua_State) -> *mut c_void {
|
pub unsafe fn lua_getextraspace(L: *mut lua_State) -> *mut c_void {
|
||||||
use super::glue::LUA_EXTRASPACE;
|
use super::glue::LUA_EXTRASPACE;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(clippy::wrong_self_convention)]
|
||||||
|
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::result::Result as StdResult;
|
use std::result::Result as StdResult;
|
||||||
|
|
Loading…
Reference in New Issue