@@ -125,9 +125,6 @@ pub enum SchnorrSighashType {
125
125
NonePlusAnyoneCanPay = 0x82 ,
126
126
/// 0x83: Sign one output and only this input (see `Single` for what "one output" means).
127
127
SinglePlusAnyoneCanPay = 0x83 ,
128
-
129
- /// Reserved for future use, `#[non_exhaustive]` is not available with MSRV 1.29.0
130
- Reserved = 0xFF ,
131
128
}
132
129
serde_string_impl ! ( SchnorrSighashType , "a SchnorrSighashType data" ) ;
133
130
@@ -141,7 +138,6 @@ impl fmt::Display for SchnorrSighashType {
141
138
SchnorrSighashType :: AllPlusAnyoneCanPay => "SIGHASH_ALL|SIGHASH_ANYONECANPAY" ,
142
139
SchnorrSighashType :: NonePlusAnyoneCanPay => "SIGHASH_NONE|SIGHASH_ANYONECANPAY" ,
143
140
SchnorrSighashType :: SinglePlusAnyoneCanPay => "SIGHASH_SINGLE|SIGHASH_ANYONECANPAY" ,
144
- SchnorrSighashType :: Reserved => "SIGHASH_RESERVED" ,
145
141
} ;
146
142
f. write_str ( s)
147
143
}
@@ -159,7 +155,6 @@ impl str::FromStr for SchnorrSighashType {
159
155
"SIGHASH_ALL|SIGHASH_ANYONECANPAY" => Ok ( SchnorrSighashType :: AllPlusAnyoneCanPay ) ,
160
156
"SIGHASH_NONE|SIGHASH_ANYONECANPAY" => Ok ( SchnorrSighashType :: NonePlusAnyoneCanPay ) ,
161
157
"SIGHASH_SINGLE|SIGHASH_ANYONECANPAY" => Ok ( SchnorrSighashType :: SinglePlusAnyoneCanPay ) ,
162
- "SIGHASH_RESERVED" => Ok ( SchnorrSighashType :: Reserved ) ,
163
158
_ => Err ( SighashTypeParseError { unrecognized : s. to_owned ( ) } ) ,
164
159
}
165
160
}
@@ -330,7 +325,6 @@ impl SchnorrSighashType {
330
325
SchnorrSighashType :: AllPlusAnyoneCanPay => ( SchnorrSighashType :: All , true ) ,
331
326
SchnorrSighashType :: NonePlusAnyoneCanPay => ( SchnorrSighashType :: None , true ) ,
332
327
SchnorrSighashType :: SinglePlusAnyoneCanPay => ( SchnorrSighashType :: Single , true ) ,
333
- SchnorrSighashType :: Reserved => ( SchnorrSighashType :: Reserved , false ) ,
334
328
}
335
329
}
336
330
@@ -344,7 +338,6 @@ impl SchnorrSighashType {
344
338
0x81 => Ok ( SchnorrSighashType :: AllPlusAnyoneCanPay ) ,
345
339
0x82 => Ok ( SchnorrSighashType :: NonePlusAnyoneCanPay ) ,
346
340
0x83 => Ok ( SchnorrSighashType :: SinglePlusAnyoneCanPay ) ,
347
- 0xFF => Ok ( SchnorrSighashType :: Reserved ) ,
348
341
x => Err ( Error :: InvalidSighashType ( x as u32 ) ) ,
349
342
}
350
343
}
@@ -1174,7 +1167,6 @@ mod tests {
1174
1167
( "SIGHASH_ALL|SIGHASH_ANYONECANPAY" , SchnorrSighashType :: AllPlusAnyoneCanPay ) ,
1175
1168
( "SIGHASH_NONE|SIGHASH_ANYONECANPAY" , SchnorrSighashType :: NonePlusAnyoneCanPay ) ,
1176
1169
( "SIGHASH_SINGLE|SIGHASH_ANYONECANPAY" , SchnorrSighashType :: SinglePlusAnyoneCanPay ) ,
1177
- ( "SIGHASH_RESERVED" , SchnorrSighashType :: Reserved ) ,
1178
1170
] ;
1179
1171
for ( s, sht) in sighashtypes {
1180
1172
assert_eq ! ( sht. to_string( ) , s) ;
0 commit comments