Skip to content

Commit

Permalink
fix build for linux
Browse files Browse the repository at this point in the history
kkent030315 committed Oct 31, 2023
1 parent 05481fd commit 6def67e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -15,9 +15,8 @@

extern crate proc_macro;

use std::fs::File;
use std::fs::{self, File};
use std::io::{Read, Seek};
use std::os::windows::prelude::MetadataExt;
use std::path::PathBuf;
use std::str::{from_utf8, FromStr};

@@ -161,7 +160,7 @@ fn inner(ts: TokenStream, utf8: bool) -> syn::Result<impl Into<TokenStream>> {
#[cfg(not(feature = "no-compression-warnings"))]
{
let compression_ratio = compression_ratio(
file.metadata().unwrap().file_size(),
fs::metadata(&target).map_err(emap)?.len(),
compressed_buffer.len() as u64,
);

0 comments on commit 6def67e

Please sign in to comment.