11use bc_shamir:: MAX_SHARE_COUNT ;
22
3- use crate :: Error ;
3+ use crate :: { Error , Result } ;
44
55/// A specification for an SSKR split.
66#[ derive( Debug , Clone , PartialEq ) ]
@@ -24,7 +24,7 @@ impl Spec {
2424 /// Returns an error if the group threshold is zero, if the group threshold
2525 /// is greater than the number of groups, or if the number of groups is
2626 /// greater than the maximum share count.
27- pub fn new ( group_threshold : usize , groups : Vec < GroupSpec > ) -> Result < Self , Error > {
27+ pub fn new ( group_threshold : usize , groups : Vec < GroupSpec > ) -> Result < Self > {
2828 if group_threshold == 0 {
2929 return Err ( Error :: GroupThresholdInvalid ) ;
3030 }
@@ -83,7 +83,7 @@ impl GroupSpec {
8383 /// Returns an error if the member count is zero, if the member count is
8484 /// greater than the maximum share count, or if the member threshold is
8585 /// greater than the member count.
86- pub fn new ( member_threshold : usize , member_count : usize ) -> Result < Self , Error > {
86+ pub fn new ( member_threshold : usize , member_count : usize ) -> Result < Self > {
8787 if member_count == 0 {
8888 return Err ( Error :: MemberCountInvalid ) ;
8989 }
@@ -107,7 +107,7 @@ impl GroupSpec {
107107 }
108108
109109 /// Parses a group specification from a string.
110- pub fn parse ( s : & str ) -> Result < Self , Error > {
110+ pub fn parse ( s : & str ) -> Result < Self > {
111111 let parts: Vec < & str > = s. split ( '-' ) . collect ( ) ;
112112 if parts. len ( ) != 3 {
113113 return Err ( Error :: GroupSpecInvalid ) ;
0 commit comments