Skip to content

Commit

Permalink
chore: Remove unnecessary clone in ValidationError::to_owned
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Dygalo <[email protected]>
  • Loading branch information
Stranger6667 committed Feb 6, 2025
1 parent 6a9f3ff commit e7a25b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/jsonschema/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a> ValidationError<'a> {
/// Converts the `ValidationError` into an owned version with `'static` lifetime.
pub fn to_owned(self) -> ValidationError<'static> {
ValidationError {
instance_path: self.instance_path.clone(),
instance_path: self.instance_path,
instance: Cow::Owned(self.instance.into_owned()),
kind: self.kind,
schema_path: self.schema_path,
Expand Down

0 comments on commit e7a25b6

Please sign in to comment.