mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-04 20:11:21 +00:00
clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
be69408ca8
commit
02e4344e7e
@ -204,7 +204,7 @@ pub fn handle_function(
|
|||||||
|
|
||||||
let has_return_value = match &func.sig.output {
|
let has_return_value = match &func.sig.output {
|
||||||
syn::ReturnType::Default => Return::None(false),
|
syn::ReturnType::Default => Return::None(false),
|
||||||
syn::ReturnType::Type(_arrow, ty) => match get_result_type(&**ty) {
|
syn::ReturnType::Type(_arrow, ty) => match get_result_type(ty) {
|
||||||
(syn::Type::Tuple(tuple), result) if tuple.elems.is_empty() => Return::None(result),
|
(syn::Type::Tuple(tuple), result) if tuple.elems.is_empty() => Return::None(result),
|
||||||
(syn::Type::Tuple(tuple), result) => Return::Tuple(result, tuple.elems.len()),
|
(syn::Type::Tuple(tuple), result) => Return::Tuple(result, tuple.elems.len()),
|
||||||
(_, result) => Return::Single(result),
|
(_, result) => Return::Single(result),
|
||||||
|
@ -133,13 +133,13 @@ impl core::ops::Deref for Array {
|
|||||||
type Target = ScalarRef;
|
type Target = ScalarRef;
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&*self.0
|
&self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl core::ops::DerefMut for Array {
|
impl core::ops::DerefMut for Array {
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||||
&mut *self.0
|
&mut self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,13 +151,13 @@ impl core::ops::Deref for Hash {
|
|||||||
type Target = ScalarRef;
|
type Target = ScalarRef;
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
&*self.0
|
&self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl core::ops::DerefMut for Hash {
|
impl core::ops::DerefMut for Hash {
|
||||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||||
&mut *self.0
|
&mut self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,10 +452,10 @@ impl core::ops::Deref for Value {
|
|||||||
|
|
||||||
fn deref(&self) -> &Self::Target {
|
fn deref(&self) -> &Self::Target {
|
||||||
match self {
|
match self {
|
||||||
Value::Scalar(v) => &**v,
|
Value::Scalar(v) => v,
|
||||||
Value::Reference(v) => &**v,
|
Value::Reference(v) => v,
|
||||||
Value::Array(v) => &**v,
|
Value::Array(v) => v,
|
||||||
Value::Hash(v) => &**v,
|
Value::Hash(v) => v,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -474,7 +474,7 @@ impl core::ops::DerefMut for Value {
|
|||||||
impl AsRef<ScalarRef> for Value {
|
impl AsRef<ScalarRef> for Value {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_ref(&self) -> &ScalarRef {
|
fn as_ref(&self) -> &ScalarRef {
|
||||||
&**self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user