From d0c3846a08f755a05d3539916246d0438d5cb3de Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Wed, 7 Feb 2024 11:20:38 +0300 Subject: [PATCH] linted Signed-off-by: DenisRybas --- vdr/src/contracts/cl/types/schema.rs | 14 +++++++++++--- vdr/src/error/mod.rs | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/vdr/src/contracts/cl/types/schema.rs b/vdr/src/contracts/cl/types/schema.rs index ba3ad1b6..43ceda89 100644 --- a/vdr/src/contracts/cl/types/schema.rs +++ b/vdr/src/contracts/cl/types/schema.rs @@ -1,4 +1,8 @@ -use crate::{error::VdrError, types::{ContractOutput, ContractParam}, Address, VdrResult, SchemaId}; +use crate::{ + error::VdrError, + types::{ContractOutput, ContractParam}, + Address, SchemaId, VdrResult, +}; use crate::{contracts::did::types::did::DID, types::ContractEvent}; use serde_derive::{Deserialize, Serialize}; @@ -34,7 +38,9 @@ impl Schema { fn require_version(&self) -> VdrResult<()> { if self.version.is_empty() { - return Err(VdrError::InvalidSchema("Version is not provided".to_string())); + return Err(VdrError::InvalidSchema( + "Version is not provided".to_string(), + )); } Ok(()) @@ -42,7 +48,9 @@ impl Schema { fn require_attributes(&self) -> VdrResult<()> { if self.attr_names.is_empty() { - return Err(VdrError::InvalidSchema("Attributes are not provided".to_string())); + return Err(VdrError::InvalidSchema( + "Attributes are not provided".to_string(), + )); } Ok(()) diff --git a/vdr/src/error/mod.rs b/vdr/src/error/mod.rs index bbe6acd8..0ffe80af 100644 --- a/vdr/src/error/mod.rs +++ b/vdr/src/error/mod.rs @@ -59,7 +59,7 @@ pub enum VdrError { GetTransactionError(String), #[error("Invalid schema: {}", _0)] - InvalidSchema(String) + InvalidSchema(String), } pub type VdrResult = Result;