@@ -2,12 +2,8 @@ pub mod black_box_functions;
2
2
pub mod brillig;
3
3
pub mod opcodes;
4
4
5
- use crate :: {
6
- native_types:: { Expression , Witness } ,
7
- proto:: convert:: ProtoSchema ,
8
- } ;
5
+ use crate :: native_types:: { Expression , Witness } ;
9
6
use acir_field:: AcirField ;
10
- use noir_protobuf:: ProtoCodec as _;
11
7
pub use opcodes:: Opcode ;
12
8
use thiserror:: Error ;
13
9
@@ -258,6 +254,8 @@ impl<F: Serialize + AcirField> Program<F> {
258
254
// s.take_buffer()
259
255
260
256
// # Protobuf
257
+ use crate :: proto:: convert:: ProtoSchema ;
258
+ use noir_protobuf:: ProtoCodec ;
261
259
ProtoSchema :: < F > :: serialize_to_vec ( self )
262
260
} ;
263
261
let mut encoder = flate2:: write:: GzEncoder :: new ( writer, Compression :: default ( ) ) ;
@@ -290,7 +288,7 @@ impl<F: AcirField + for<'a> Deserialize<'a>> Program<F> {
290
288
gz_decoder. read_to_end ( & mut buf) ?;
291
289
let result = {
292
290
// # Bincode
293
- //bincode::deserialize(&buf)
291
+ // bincode::deserialize(&buf)
294
292
295
293
// # CBOR
296
294
// ciborium::from_reader(buf.as_slice())
@@ -300,6 +298,8 @@ impl<F: AcirField + for<'a> Deserialize<'a>> Program<F> {
300
298
// Self::deserialize(r)
301
299
302
300
// # Protobuf
301
+ use crate :: proto:: convert:: ProtoSchema ;
302
+ use noir_protobuf:: ProtoCodec ;
303
303
ProtoSchema :: < F > :: deserialize_from_vec ( & buf)
304
304
} ;
305
305
result. map_err ( |err| std:: io:: Error :: new ( std:: io:: ErrorKind :: InvalidInput , err) )
0 commit comments