Skip to content

Commit

Permalink
Misc clippy lints and note
Browse files Browse the repository at this point in the history
  • Loading branch information
emesare committed Nov 8, 2024
1 parent e6add5d commit 2d296ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rust/signature.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::io::Write;
use crate::fb_sig as fb;
use crate::r#type::ComputedType;
use crate::signature::function::Function;
use flatbuffers::{FlatBufferBuilder, WIPOffset};
use flate2::Compression;
use std::io::Write;

pub mod basic_block;
pub mod function;
Expand Down Expand Up @@ -75,8 +75,11 @@ impl Data {
let mut builder = FlatBufferBuilder::new();
let fb_data = self.create(&mut builder);
builder.finish_minimal(fb_data);
// Move this to Data spec enum or something so that in the future we can do uncompressed versions.
let mut encoder = flate2::write::GzEncoder::new(Vec::new(), Compression::default());
encoder.write_all(builder.finished_data()).expect("Failed to compress data");
encoder
.write_all(builder.finished_data())
.expect("Failed to compress data");
encoder.finish().expect("Failed to finish compression")
}

Expand Down

0 comments on commit 2d296ad

Please sign in to comment.