mirror of
https://git.proxmox.com/git/perlmod
synced 2025-10-04 21:26:38 +00:00
perlmod: clippy fixes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
a2a884c13d
commit
3d5b075bdc
@ -506,7 +506,7 @@ impl<'a> HashAccess<'a> {
|
|||||||
pub fn new(value: &'a hash::Hash) -> Self {
|
pub fn new(value: &'a hash::Hash) -> Self {
|
||||||
drop(value.shared_iter()); // reset iterator
|
drop(value.shared_iter()); // reset iterator
|
||||||
Self {
|
Self {
|
||||||
hash: &value,
|
hash: value,
|
||||||
entry: std::ptr::null_mut(),
|
entry: std::ptr::null_mut(),
|
||||||
finished: false,
|
finished: false,
|
||||||
at_value: false,
|
at_value: false,
|
||||||
|
@ -216,7 +216,7 @@ impl ScalarRef {
|
|||||||
let ty = ffi::RSPL_svtype(sv);
|
let ty = ffi::RSPL_svtype(sv);
|
||||||
if ty == 0 {
|
if ty == 0 {
|
||||||
// Looks like undef
|
// Looks like undef
|
||||||
return Type::Scalar(Flags::empty());
|
Type::Scalar(Flags::empty())
|
||||||
} else if ty == ffi::RSPL_PVLV() {
|
} else if ty == ffi::RSPL_PVLV() {
|
||||||
// We don't support all kinds of magic, but some lvalues are simple:
|
// We don't support all kinds of magic, but some lvalues are simple:
|
||||||
// Try to GET the value and then check for definedness.
|
// Try to GET the value and then check for definedness.
|
||||||
@ -228,11 +228,11 @@ impl ScalarRef {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise we just try to "recurse", which will work for substrings.
|
// Otherwise we just try to "recurse", which will work for substrings.
|
||||||
return Self::get_type(ffi::RSPL_LvTARG(sv));
|
Self::get_type(ffi::RSPL_LvTARG(sv))
|
||||||
} else {
|
} else {
|
||||||
return Type::Other(ty as u8);
|
Type::Other(ty as u8)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get some information about the value's type.
|
/// Get some information about the value's type.
|
||||||
@ -359,7 +359,7 @@ impl ScalarRef {
|
|||||||
|
|
||||||
impl std::fmt::Debug for Scalar {
|
impl std::fmt::Debug for Scalar {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
let this: &ScalarRef = &self;
|
let this: &ScalarRef = self;
|
||||||
std::fmt::Debug::fmt(this, f)
|
std::fmt::Debug::fmt(this, f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user