mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Simplify default Result generics.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
8244d78cb2
commit
ae707ab465
42 files changed
+95
-115
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user