Skip to content

Commit 78db616

Browse files
committed
consolidate some FIXMEs
When you grep the codebase for FIXME it's nice if the output isn't overwhelmed by the same message repeated 20 times.
1 parent 0666aef commit 78db616

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/miniscript/types/mod.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl Type {
220220

221221
/// Constructor for the type of the `a:` fragment.
222222
pub const fn cast_alt(self) -> Result<Self, ErrorKind> {
223-
// FIXME need to do manual `?` because ? is not supported in constfns.
223+
// FIXME need to do manual `?` because ? is not supported in constfns. (Also below.)
224224
Ok(Type {
225225
corr: match Correctness::cast_alt(self.corr) {
226226
Ok(x) => x,
@@ -232,7 +232,6 @@ impl Type {
232232

233233
/// Constructor for the type of the `s:` fragment.
234234
pub const fn cast_swap(self) -> Result<Self, ErrorKind> {
235-
// FIXME need to do manual `?` because ? is not supported in constfns.
236235
Ok(Type {
237236
corr: match Correctness::cast_swap(self.corr) {
238237
Ok(x) => x,
@@ -255,7 +254,6 @@ impl Type {
255254

256255
/// Constructor for the type of the `d:` fragment.
257256
pub const fn cast_dupif(self) -> Result<Self, ErrorKind> {
258-
// FIXME need to do manual `?` because ? is not supported in constfns.
259257
Ok(Type {
260258
corr: match Correctness::cast_dupif(self.corr) {
261259
Ok(x) => x,
@@ -267,7 +265,6 @@ impl Type {
267265

268266
/// Constructor for the type of the `v:` fragment.
269267
pub const fn cast_verify(self) -> Result<Self, ErrorKind> {
270-
// FIXME need to do manual `?` because ? is not supported in constfns.
271268
Ok(Type {
272269
corr: match Correctness::cast_verify(self.corr) {
273270
Ok(x) => x,
@@ -279,7 +276,6 @@ impl Type {
279276

280277
/// Constructor for the type of the `j:` fragment.
281278
pub const fn cast_nonzero(self) -> Result<Self, ErrorKind> {
282-
// FIXME need to do manual `?` because ? is not supported in constfns.
283279
Ok(Type {
284280
corr: match Correctness::cast_nonzero(self.corr) {
285281
Ok(x) => x,
@@ -291,7 +287,6 @@ impl Type {
291287

292288
/// Constructor for the type of the `n:` fragment.
293289
pub const fn cast_zeronotequal(self) -> Result<Self, ErrorKind> {
294-
// FIXME need to do manual `?` because ? is not supported in constfns.
295290
Ok(Type {
296291
corr: match Correctness::cast_zeronotequal(self.corr) {
297292
Ok(x) => x,
@@ -303,7 +298,6 @@ impl Type {
303298

304299
/// Constructor for the type of the `t:` fragment.
305300
pub const fn cast_true(self) -> Result<Self, ErrorKind> {
306-
// FIXME need to do manual `?` because ? is not supported in constfns.
307301
Ok(Type {
308302
corr: match Correctness::cast_true(self.corr) {
309303
Ok(x) => x,
@@ -315,7 +309,6 @@ impl Type {
315309

316310
/// Constructor for the type of the `u:` fragment.
317311
pub const fn cast_unlikely(self) -> Result<Self, ErrorKind> {
318-
// FIXME need to do manual `?` because ? is not supported in constfns.
319312
Ok(Type {
320313
corr: match Correctness::cast_or_i_false(self.corr) {
321314
Ok(x) => x,
@@ -327,7 +320,6 @@ impl Type {
327320

328321
/// Constructor for the type of the `l:` fragment.
329322
pub const fn cast_likely(self) -> Result<Self, ErrorKind> {
330-
// FIXME need to do manual `?` because ? is not supported in constfns.
331323
Ok(Type {
332324
corr: match Correctness::cast_or_i_false(self.corr) {
333325
Ok(x) => x,
@@ -339,7 +331,6 @@ impl Type {
339331

340332
/// Constructor for the type of the `and_b` fragment.
341333
pub const fn and_b(left: Self, right: Self) -> Result<Self, ErrorKind> {
342-
// FIXME need to do manual `?` because ? is not supported in constfns.
343334
Ok(Type {
344335
corr: match Correctness::and_b(left.corr, right.corr) {
345336
Ok(x) => x,
@@ -351,7 +342,6 @@ impl Type {
351342

352343
/// Constructor for the type of the `and_v` fragment.
353344
pub const fn and_v(left: Self, right: Self) -> Result<Self, ErrorKind> {
354-
// FIXME need to do manual `?` because ? is not supported in constfns.
355345
Ok(Type {
356346
corr: match Correctness::and_v(left.corr, right.corr) {
357347
Ok(x) => x,
@@ -363,7 +353,6 @@ impl Type {
363353

364354
/// Constructor for the type of the `or_b` fragment.
365355
pub const fn or_b(left: Self, right: Self) -> Result<Self, ErrorKind> {
366-
// FIXME need to do manual `?` because ? is not supported in constfns.
367356
Ok(Type {
368357
corr: match Correctness::or_b(left.corr, right.corr) {
369358
Ok(x) => x,
@@ -375,7 +364,6 @@ impl Type {
375364

376365
/// Constructor for the type of the `or_b` fragment.
377366
pub const fn or_d(left: Self, right: Self) -> Result<Self, ErrorKind> {
378-
// FIXME need to do manual `?` because ? is not supported in constfns.
379367
Ok(Type {
380368
corr: match Correctness::or_d(left.corr, right.corr) {
381369
Ok(x) => x,
@@ -387,7 +375,6 @@ impl Type {
387375

388376
/// Constructor for the type of the `or_c` fragment.
389377
pub const fn or_c(left: Self, right: Self) -> Result<Self, ErrorKind> {
390-
// FIXME need to do manual `?` because ? is not supported in constfns.
391378
Ok(Type {
392379
corr: match Correctness::or_c(left.corr, right.corr) {
393380
Ok(x) => x,
@@ -410,7 +397,6 @@ impl Type {
410397

411398
/// Constructor for the type of the `and_or` fragment.
412399
pub const fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind> {
413-
// FIXME need to do manual `?` because ? is not supported in constfns.
414400
Ok(Type {
415401
corr: match Correctness::and_or(a.corr, b.corr, c.corr) {
416402
Ok(x) => x,

0 commit comments

Comments
 (0)