Skip to content

Commit

Permalink
fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wulfraem committed Nov 28, 2024
1 parent 9e02cee commit 6a1f4b3
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions identity_document/src/document/core_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ impl CoreDocument {
&'me self,
method_query: Q,
scope: Option<MethodScope>,
) -> Option<&VerificationMethod>
) -> Option<&'me VerificationMethod>
where
Q: Into<DIDUrlQuery<'query>>,
{
Expand Down Expand Up @@ -773,7 +773,7 @@ impl CoreDocument {
/// Returns the first [`Service`] with an `id` property matching the provided `service_query`, if present.
// NOTE: This method demonstrates unexpected behavior in the edge cases where the document contains
// services whose ids are of the form <did different from this document's>#<fragment>.
pub fn resolve_service<'query, 'me, Q>(&'me self, service_query: Q) -> Option<&Service>
pub fn resolve_service<'query, 'me, Q>(&'me self, service_query: Q) -> Option<&'me Service>
where
Q: Into<DIDUrlQuery<'query>>,
{
Expand Down
4 changes: 2 additions & 2 deletions identity_iota_core/src/document/iota_document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl IotaDocument {
/// Returns the first [`Service`] with an `id` property matching the provided `service_query`, if present.
// NOTE: This method demonstrates unexpected behaviour in the edge cases where the document contains
// services whose ids are of the form <did different from this document's>#<fragment>.
pub fn resolve_service<'query, 'me, Q>(&'me self, service_query: Q) -> Option<&Service>
pub fn resolve_service<'query, 'me, Q>(&'me self, service_query: Q) -> Option<&'me Service>
where
Q: Into<DIDUrlQuery<'query>>,
{
Expand All @@ -347,7 +347,7 @@ impl IotaDocument {
&'me self,
method_query: Q,
scope: Option<MethodScope>,
) -> Option<&VerificationMethod>
) -> Option<&'me VerificationMethod>
where
Q: Into<DIDUrlQuery<'query>>,
{
Expand Down
4 changes: 2 additions & 2 deletions identity_iota_core/src/rebased/assets/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ impl<T> AuthenticatedAssetBuilder<T> {
}

/// Proposal for the transfer of an [`AuthenticatedAsset`]'s ownership from one [`IotaAddress`] to another.
///
/// # Detailed Workflow
/// A [`TransferProposal`] is a **shared** _Move_ object that represents a request to transfer ownership
/// of an [`AuthenticatedAsset`] to a new owner.
Expand Down Expand Up @@ -375,7 +375,7 @@ pub struct UpdateContentTx<'a, T> {
}

#[async_trait]
impl<'a, T> Transaction for UpdateContentTx<'a, T>
impl<T> Transaction for UpdateContentTx<'_, T>
where
T: MoveType + Serialize + Clone + Send + Sync,
{
Expand Down
1 change: 0 additions & 1 deletion identity_iota_core/src/rebased/migration/alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub struct UnmigratedAlias {

/// The sender feature.
pub sender: Option<IotaAddress>,
/// The metadata feature. pub metadata: Option<Vec<u8>>,

/// The immutable issuer feature.
pub immutable_issuer: Option<IotaAddress>,
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/migration/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ impl MoveType for OnChainIdentity {
pub struct CreateIdentityTx<'a>(IdentityBuilder<'a>);

#[async_trait]
impl<'a> Transaction for CreateIdentityTx<'a> {
impl Transaction for CreateIdentityTx<'_> {
type Output = OnChainIdentity;
async fn execute_with_opt_gas<S>(
self,
Expand Down
4 changes: 2 additions & 2 deletions identity_iota_core/src/rebased/proposals/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl BorrowAction {
}
}

impl<'i> ProposalBuilder<'i, BorrowAction> {
impl ProposalBuilder<'_, BorrowAction> {
/// Adds an object to the list of objects that will be borrowed when executing this action.
pub fn borrow(mut self, object_id: ObjectID) -> Self {
self.borrow_object(object_id);
Expand Down Expand Up @@ -177,7 +177,7 @@ impl<'i> ProtoTransaction for UserDrivenTx<'i, BorrowAction> {
}

#[async_trait]
impl<'i, F> Transaction for UserDrivenTx<'i, BorrowActionWithIntent<F>>
impl<F> Transaction for UserDrivenTx<'_, BorrowActionWithIntent<F>>
where
F: FnOnce(&mut Ptb, &HashMap<ObjectID, (Argument, IotaObjectData)>) + Send,
{
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/proposals/config_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl MoveType for ConfigChange {
}
}

impl<'i> ProposalBuilder<'i, ConfigChange> {
impl ProposalBuilder<'_, ConfigChange> {
/// Sets a new value for the identity's threshold.
pub fn threshold(mut self, threshold: u64) -> Self {
self.set_threshold(threshold);
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/proposals/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl<'i> ProtoTransaction for UserDrivenTx<'i, ControllerExecution> {
}

#[async_trait]
impl<'i, F> Transaction for UserDrivenTx<'i, ControllerExecutionWithIntent<F>>
impl<F> Transaction for UserDrivenTx<'_, ControllerExecutionWithIntent<F>>
where
F: FnOnce(&mut Ptb, &Argument) + Send,
{
Expand Down
10 changes: 5 additions & 5 deletions identity_iota_core/src/rebased/proposals/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ pub struct ProposalBuilder<'i, A> {
action: A,
}

impl<'i, A> Deref for ProposalBuilder<'i, A> {
impl<A> Deref for ProposalBuilder<'_, A> {
type Target = A;
fn deref(&self) -> &Self::Target {
&self.action
}
}

impl<'i, A> DerefMut for ProposalBuilder<'i, A> {
impl<A> DerefMut for ProposalBuilder<'_, A> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.action
}
Expand Down Expand Up @@ -161,7 +161,7 @@ pub struct CreateProposalTx<'i, A> {
}

#[async_trait]
impl<'i, A> Transaction for CreateProposalTx<'i, A>
impl<A> Transaction for CreateProposalTx<'_, A>
where
Proposal<A>: ProposalT<Action = A> + DeserializeOwned,
A: Send,
Expand Down Expand Up @@ -234,7 +234,7 @@ pub struct ExecuteProposalTx<'i, A> {
}

#[async_trait]
impl<'i, A> Transaction for ExecuteProposalTx<'i, A>
impl<A> Transaction for ExecuteProposalTx<'_, A>
where
Proposal<A>: ProposalT<Action = A>,
A: Send,
Expand Down Expand Up @@ -278,7 +278,7 @@ pub struct ApproveProposalTx<'p, 'i, A> {
}

#[async_trait]
impl<'p, 'i, A> Transaction for ApproveProposalTx<'p, 'i, A>
impl<A> Transaction for ApproveProposalTx<'_, '_, A>
where
Proposal<A>: ProposalT<Action = A>,
A: MoveType + Send,
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/src/rebased/proposals/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl SendAction {
}
}

impl<'i> ProposalBuilder<'i, SendAction> {
impl ProposalBuilder<'_, SendAction> {
/// Adds one object to the list of objects to send.
pub fn object(mut self, object_id: ObjectID, recipient: IotaAddress) -> Self {
self.send_object(object_id, recipient);
Expand Down

0 comments on commit 6a1f4b3

Please sign in to comment.