refactor(tvix/castore): clippy

Change-Id: I8a792d6b238190a78390c5d8f638669a2681f70f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9746
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
Florian Klink 2023-10-16 11:41:38 +01:00 committed by flokli
parent 869be82e09
commit 1d97b4230f

View file

@ -133,7 +133,7 @@ impl node::Node {
}
// ensure the symlink target is not empty and doesn't contain null bytes.
node::Node::Symlink(symlink_node) => {
if symlink_node.target.len() == 0 || symlink_node.target.contains(&b'\0') {
if symlink_node.target.is_empty() || symlink_node.target.contains(&b'\0') {
Err(ValidateNodeError::InvalidSymlinkTarget(
symlink_node.target.to_vec(),
))?;