mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +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
@@ -22,7 +22,7 @@ where
|
||||
|
||||
pub fn fmt<F, S>(fun: F, out: Arc<Mutex<S>>) -> Box<Closure>
|
||||
where
|
||||
F: Fn(&mut S, &Level, &str, &str) -> Result<()> + Send + Sync + Copy + 'static,
|
||||
F: Fn(&mut S, &Level, &str, &str) -> Result + Send + Sync + Copy + 'static,
|
||||
S: std::fmt::Write + Send + 'static,
|
||||
{
|
||||
Box::new(move |data| call(fun, &mut *out.lock().expect("locked"), &data))
|
||||
@@ -30,7 +30,7 @@ where
|
||||
|
||||
fn call<F, S>(fun: F, out: &mut S, data: &Data<'_>)
|
||||
where
|
||||
F: Fn(&mut S, &Level, &str, &str) -> Result<()>,
|
||||
F: Fn(&mut S, &Level, &str, &str) -> Result,
|
||||
S: std::fmt::Write,
|
||||
{
|
||||
fun(out, &data.level(), data.span_name(), data.message()).expect("log line appended");
|
||||
|
||||
Reference in new issue
Block a user