Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj committed Nov 7, 2023
1 parent f6cec03 commit 3c92515
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions primitives/src/traits/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Tangle. If not, see <http://www.gnu.org/licenses/>.

use crate::jobs::{ValidatorOffence};
use crate::roles::RoleType;
use crate::{jobs::ValidatorOffence, roles::RoleType};
use sp_runtime::DispatchResult;

/// A trait that handles roles associated with job types.
Expand Down
6 changes: 3 additions & 3 deletions primitives/src/types/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Tangle. If not, see <http://www.gnu.org/licenses/>.

use frame_support::pallet_prelude::*;
use crate::jobs::JobKey;
use frame_support::pallet_prelude::*;

/// Role type to be used in the system.
#[derive(Encode, Decode, Clone, Copy, Debug, PartialEq, Eq, TypeInfo)]
Expand All @@ -38,11 +38,11 @@ impl RoleType {

impl From<JobKey> for RoleType {
fn from(job_key: JobKey) -> Self {
match job_key {
match job_key {
JobKey::DKG => RoleType::Tss,
JobKey::DKGSignature => RoleType::Tss,
JobKey::ZkSaasPhaseOne => RoleType::ZkSaas,
JobKey::ZkSaasPhaseTwo => RoleType::ZkSaas,
}
}
}
}

0 comments on commit 3c92515

Please sign in to comment.