diff options
author | edef <edef@edef.eu> | 2023-10-27T12·31+0000 |
---|---|---|
committer | edef <edef@edef.eu> | 2023-10-27T13·56+0000 |
commit | e5252720192064c8dfee6b869e8a5859d08e4a94 (patch) | |
tree | 69e1d3bbd4d598c98e13050e8371a4dfd6d9c448 /tvix/castore/src/proto/mod.rs | |
parent | 520c5a191e34e5b784efc624648ebd6d9292b556 (diff) |
refactor(tvix): turn nullary enum variants into unit variants r/6893
Change-Id: Iad4f2cb4aa92b5bb29ead6050348a8cd3e7b8632 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9860 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src/proto/mod.rs')
-rw-r--r-- | tvix/castore/src/proto/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/proto/mod.rs b/tvix/castore/src/proto/mod.rs index cd7ea66b8ccd..f590c6841336 100644 --- a/tvix/castore/src/proto/mod.rs +++ b/tvix/castore/src/proto/mod.rs @@ -48,7 +48,7 @@ pub enum ValidateNodeError { InvalidDigestLen(usize), /// Invalid name encountered #[error("Invalid name")] - InvalidName(), + InvalidName, /// Invalid symlink target #[error("Invalid symlink target: {}", .0.as_bstr())] InvalidSymlinkTarget(Vec<u8>), @@ -63,7 +63,7 @@ fn validate_node_name(name: &[u8]) -> Result<(), ValidateNodeError> { || name.contains(&0x00) || name.contains(&b'/') { - Err(ValidateNodeError::InvalidName())?; + Err(ValidateNodeError::InvalidName)?; } Ok(()) } |