mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-21 19:31:00 +00:00
Clippy
This commit is contained in:
parent
a65404b4a9
commit
8bf3f2fc17
3 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams"
|
||||
description = "A set of core types and traits for activitystreams data"
|
||||
version = "0.7.0-alpha.23"
|
||||
version = "0.7.0-alpha.24"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/asonix/activitystreams"
|
||||
|
|
|
@ -263,7 +263,7 @@ pub trait BaseExt: AsBase {
|
|||
let authority = self
|
||||
.id_unchecked()
|
||||
.and_then(|id| id.authority_components())
|
||||
.ok_or(CheckError(Some(iri.as_ref().to_owned())))?;
|
||||
.ok_or_else(|| CheckError(Some(iri.as_ref().to_owned())))?;
|
||||
check(iri, authority.host(), authority.port())
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ pub(crate) fn check<T: AsRef<IriStr>>(
|
|||
let authority = iri
|
||||
.as_ref()
|
||||
.authority_components()
|
||||
.ok_or(CheckError(Some(iri.as_ref().to_owned())))?;
|
||||
.ok_or_else(|| CheckError(Some(iri.as_ref().to_owned())))?;
|
||||
|
||||
if authority.host() != host || authority.port() != port {
|
||||
return Err(CheckError(Some(iri.as_ref().to_owned())));
|
||||
|
|
Loading…
Reference in a new issue