Browse Source

replaced iter any with iter all

ignazio 3 years ago
parent
commit
4480a88b39
1 changed files with 2 additions and 2 deletions
  1. 2 2
      runtime-modules/content/src/lib.rs

+ 2 - 2
runtime-modules/content/src/lib.rs

@@ -1447,9 +1447,9 @@ impl<T: Trait> Module<T> {
 
     fn validate_collaborator_set(collaborators: &BTreeSet<T::MemberId>) -> DispatchResult {
         // check if all members are valid
-        let res = !collaborators
+        let res = collaborators
             .iter()
-            .any(|member_id| !<T as ContentActorAuthenticator>::validate_member_id(member_id));
+            .all(|member_id| <T as ContentActorAuthenticator>::validate_member_id(member_id));
         ensure!(res, Error::<T>::CollaboratorIsNotValidMember);
         Ok(())
     }