Fix clippy warnings
This commit is contained in:
parent
774e721ad9
commit
bd4f8d58ef
|
|
@ -42,7 +42,7 @@ fn cmake_params_android() -> &'static [(&'static str, &'static str)] {
|
|||
};
|
||||
for (android_arch, params) in cmake_params_android {
|
||||
if *android_arch == arch {
|
||||
return *params;
|
||||
return params;
|
||||
}
|
||||
}
|
||||
&[]
|
||||
|
|
@ -76,7 +76,7 @@ fn cmake_params_ios() -> &'static [(&'static str, &'static str)] {
|
|||
let target = std::env::var("TARGET").unwrap();
|
||||
for (ios_target, params) in CMAKE_PARAMS_IOS {
|
||||
if *ios_target == target {
|
||||
return *params;
|
||||
return params;
|
||||
}
|
||||
}
|
||||
&[]
|
||||
|
|
@ -85,7 +85,7 @@ fn cmake_params_ios() -> &'static [(&'static str, &'static str)] {
|
|||
fn get_ios_sdk_name() -> &'static str {
|
||||
for (name, value) in cmake_params_ios() {
|
||||
if *name == "CMAKE_OSX_SYSROOT" {
|
||||
return *value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
let target = std::env::var("TARGET").unwrap();
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use std::convert::TryInto;
|
|||
use std::ffi::c_void;
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_ulong};
|
||||
|
||||
#[allow(clippy::useless_transmute, clippy::derive_partial_eq_without_eq)]
|
||||
mod generated {
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ impl SslConnector {
|
|||
|
||||
/// Returns a shared reference to the inner raw `SslContext`.
|
||||
pub fn context(&self) -> &SslContextRef {
|
||||
&*self.0
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +293,7 @@ impl SslAcceptor {
|
|||
|
||||
/// Returns a shared reference to the inner raw `SslContext`.
|
||||
pub fn context(&self) -> &SslContextRef {
|
||||
&*self.0
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,13 +79,13 @@ impl<T: Stackable> iter::IntoIterator for Stack<T> {
|
|||
|
||||
impl<T: Stackable> AsRef<StackRef<T>> for Stack<T> {
|
||||
fn as_ref(&self) -> &StackRef<T> {
|
||||
&*self
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Stackable> Borrow<StackRef<T>> for Stack<T> {
|
||||
fn borrow(&self) -> &StackRef<T> {
|
||||
&*self
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ impl Stackable for OpensslString {
|
|||
|
||||
impl AsRef<str> for OpensslString {
|
||||
fn as_ref(&self) -> &str {
|
||||
&**self
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ impl Deref for OpensslStringRef {
|
|||
|
||||
impl AsRef<str> for OpensslStringRef {
|
||||
fn as_ref(&self) -> &str {
|
||||
&*self
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue