Simplify default Result generics.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-08 12:08:13 +00:00
parent 8244d78cb2
commit ae707ab465
42 changed files with 95 additions and 115 deletions

View File

@@ -36,7 +36,7 @@ pub(super) fn password(password: &str) -> Result<String> {
.map_err(map_err)
}
pub(super) fn verify_password(password: &str, password_hash: &str) -> Result<()> {
pub(super) fn verify_password(password: &str, password_hash: &str) -> Result {
let password_hash = PasswordHash::new(password_hash).map_err(map_err)?;
ARGON
.get_or_init(init_argon)

View File

@@ -42,7 +42,7 @@ macro_rules! is_format {
#[inline]
pub fn collect_stream<F>(func: F) -> Result<String>
where
F: FnOnce(&mut dyn std::fmt::Write) -> Result<()>,
F: FnOnce(&mut dyn std::fmt::Write) -> Result,
{
let mut out = String::new();
func(&mut out)?;
@@ -63,7 +63,7 @@ pub fn camel_to_snake_string(s: &str) -> String {
#[inline]
#[allow(clippy::unbuffered_bytes)] // these are allocated string utilities, not file I/O utils
pub fn camel_to_snake_case<I, O>(output: &mut O, input: I) -> Result<()>
pub fn camel_to_snake_case<I, O>(output: &mut O, input: I) -> Result
where
I: std::io::Read,
O: std::fmt::Write,