From 6a4e753069070c865d48026f3cbbaebc7c7d73eb Mon Sep 17 00:00:00 2001 From: fef Date: Thu, 22 Dec 2022 18:57:01 +0100 Subject: [PATCH] util: fix type --- src/util/bear.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/bear.rs b/src/util/bear.rs index c524520..1e0120b 100644 --- a/src/util/bear.rs +++ b/src/util/bear.rs @@ -137,7 +137,9 @@ impl<'de> de::Visitor<'de> for BearcapVisitor { impl Validate for Bearcap { fn validate(&self, builder: ResultBuilder) -> ResultBuilder { builder.field(&self.url, "url", |f| { - f.check("URL must start with https://", |v| v.starts_with("https://")) + f.check("URL must start with https://", |v| { + v.starts_with("https://") + }) }) } } @@ -148,7 +150,7 @@ mod tests { use serde_test::{assert_tokens, Token}; #[test] - fn parse_vali() { + fn parse_valid() { let bc = Bearcap::try_from("bear:?t=asdf&u=https://example.com/test") .expect("Doesn't parse valid bearcap"); assert_eq!(bc.url, String::from("https://example.com/test"));