Skip to content

Commit

Permalink
do a todo
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Mar 14, 2024
1 parent e8ec39a commit c59b061
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/lib/bool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
FieldType,
FieldVar,
readVarMessage,
withMessage,
} from './field.js';
import { Bool as B } from '../provable/field-bigint.js';
import { defineBinable } from '../bindings/lib/binable.js';
Expand Down Expand Up @@ -395,10 +396,3 @@ function toFieldVar(x: boolean | Bool): BoolVar {
if (x instanceof Bool) return x.value;
return FieldVar.constant(B(x));
}

// TODO: This is duplicated
function withMessage(error: unknown, message?: string) {
if (message === undefined || !(error instanceof Error)) return error;
error.message = `${message}\n${error.message}`;
return error;
}

0 comments on commit c59b061

Please sign in to comment.