Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions statement_validation/src/_iri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use r2c2_statement::Iri;
use regex::Regex;

/// Extension trait for [`Iri`] providing validation methods.
pub trait IriValid<'a> {
pub trait IriValidation<'a> {
/// Return a new [`Iri`] if the argument is a valid IRI, otherwise None.
#[allow(clippy::new_ret_no_self)]
fn new(txt: impl Into<Cow<'a, str>>) -> Option<Iri<'a>>;
Expand All @@ -16,7 +16,7 @@ pub trait IriValid<'a> {
fn debug_assert_is_valid(&self);
}

impl<'a> IriValid<'a> for Iri<'a> {
impl<'a> IriValidation<'a> for Iri<'a> {
fn new(txt: impl Into<Cow<'a, str>>) -> Option<Self> {
let inner = txt.into();
IRI_REGEX
Expand Down
4 changes: 2 additions & 2 deletions statement_validation/src/_language_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use r2c2_statement::LangTag;
use regex::Regex;

/// Extension trait for [`LangTag`] providing validation methods.
pub trait LangTagValid<'a> {
pub trait LangTagValidation<'a> {
/// Return a new [`LangTag`] if the argument is a valid IRI, otherwise None.
#[allow(clippy::new_ret_no_self)]
fn new(txt: impl Into<Cow<'a, str>>) -> Option<LangTag<'a>>;
Expand All @@ -16,7 +16,7 @@ pub trait LangTagValid<'a> {
fn debug_assert_is_valid(&self);
}

impl<'a> LangTagValid<'a> for LangTag<'a> {
impl<'a> LangTagValidation<'a> for LangTag<'a> {
fn new(txt: impl Into<Cow<'a, str>>) -> Option<Self> {
let inner = txt.into();
TAG_REGEX
Expand Down