Fix clippy issue

This commit is contained in:
Paul van Tilburg 2024-02-27 15:37:05 +01:00
parent d5eed08072
commit d2b90c16f6
Signed by: paul
GPG key ID: C6DE073EDA9EEC4D

View file

@ -112,7 +112,7 @@ where
use rocket::serde::de::Error;
match <StringOrObject<'_, T>>::deserialize(deserializer) {
Ok(StringOrObject::String(s)) if s.is_empty() => Ok(None),
Ok(StringOrObject::String("")) => Ok(None),
Ok(StringOrObject::String(_)) => Err(Error::custom("Non-empty string not allowed here")),
Ok(StringOrObject::Object(t)) => Ok(Some(t)),
Ok(StringOrObject::Value(j)) => Err(Error::custom(&format!(