From b455c002dc19a9c9ebb0261532bf4434640cc8aa Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 1 Aug 2023 16:51:23 +0200 Subject: refactor: remove calls to default on unit structs --- src/private/castable_factory/blocking.rs | 4 ++-- src/private/castable_factory/threadsafe.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/private/castable_factory/blocking.rs b/src/private/castable_factory/blocking.rs index 4cfa488..bf0dde8 100644 --- a/src/private/castable_factory/blocking.rs +++ b/src/private/castable_factory/blocking.rs @@ -88,12 +88,12 @@ where let mut args = type_name::(); if args.len() < 2 { - return Err(std::fmt::Error::default()); + return Err(std::fmt::Error); } args = args .get(1..args.len() - 1) - .map_or_else(|| Err(std::fmt::Error::default()), Ok)?; + .map_or_else(|| Err(std::fmt::Error), Ok)?; if args.ends_with(',') { args = args diff --git a/src/private/castable_factory/threadsafe.rs b/src/private/castable_factory/threadsafe.rs index 871af9f..5b19844 100644 --- a/src/private/castable_factory/threadsafe.rs +++ b/src/private/castable_factory/threadsafe.rs @@ -101,12 +101,12 @@ where let mut args = type_name::(); if args.len() < 2 { - return Err(std::fmt::Error::default()); + return Err(std::fmt::Error); } args = args .get(1..args.len() - 1) - .map_or_else(|| Err(std::fmt::Error::default()), Ok)?; + .map_or_else(|| Err(std::fmt::Error), Ok)?; if args.ends_with(',') { args = args -- cgit v1.2.3-18-g5258