1
0
mirror of https://github.com/Tim-Paik/neutauri.git synced 2024-10-12 23:29:41 +00:00

update deps and use vc-ltl instead of crt-static

This commit is contained in:
2023-04-17 23:17:30 +08:00
parent 2a8e27995a
commit 3449221f81
5 changed files with 65 additions and 33 deletions

View File

@ -2,7 +2,7 @@ use bincode::Options;
use serde::{Deserialize, Serialize};
use std::{
fs,
io::{self, Read, Result, SeekFrom, Seek},
io::{self, Read, Result},
path::{self, Component, Path, PathBuf},
};
use wry::application::dpi::Position;
@ -120,6 +120,7 @@ impl File {
#[cfg(feature = "runtime")]
impl Data {
pub fn new<P: AsRef<path::Path> + Copy>(path: P) -> Result<Self> {
use std::io::{Seek, SeekFrom};
let mut base = fs::File::open(path)?;
let base_length = base.metadata()?.len();
let mut magic_number_start_data = [0; MAGIC_NUMBER_START.len()];