about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nixbase32.rs
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2023-10-27T12·31+0000
committeredef <edef@edef.eu>2023-10-27T13·56+0000
commite5252720192064c8dfee6b869e8a5859d08e4a94 (patch)
tree69e1d3bbd4d598c98e13050e8371a4dfd6d9c448 /tvix/nix-compat/src/nixbase32.rs
parent520c5a191e34e5b784efc624648ebd6d9292b556 (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/nix-compat/src/nixbase32.rs')
-rw-r--r--tvix/nix-compat/src/nixbase32.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/nixbase32.rs b/tvix/nix-compat/src/nixbase32.rs
index d9821bc495bb..6f88d51b344a 100644
--- a/tvix/nix-compat/src/nixbase32.rs
+++ b/tvix/nix-compat/src/nixbase32.rs
@@ -19,7 +19,7 @@ pub enum Nixbase32DecodeError {
     #[error("character {0:x} not in alphabet")]
     CharacterNotInAlphabet(u8),
     #[error("nonzero carry")]
-    NonzeroCarry(),
+    NonzeroCarry,
     #[error("invalid length")]
     InvalidLength,
 }
@@ -118,7 +118,7 @@ fn decode_inner(input: &[u8], output: &mut [u8]) -> Result<(), Nixbase32DecodeEr
 
     // if we're at the end, but have a nonzero carry, the encoding is invalid.
     if carry != 0 {
-        return Err(Nixbase32DecodeError::NonzeroCarry());
+        return Err(Nixbase32DecodeError::NonzeroCarry);
     }
 
     Ok(())