This commit is contained in:
Simon Gardling 2022-05-05 21:18:49 -04:00
parent 506a878405
commit ff96995ea8
2 changed files with 16 additions and 13 deletions

12
Cargo.lock generated
View File

@ -663,7 +663,7 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]] [[package]]
name = "eframe" name = "eframe"
version = "0.18.0" version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"egui", "egui",
@ -683,7 +683,7 @@ dependencies = [
[[package]] [[package]]
name = "egui" name = "egui"
version = "0.18.1" version = "0.18.1"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"ahash", "ahash",
"epaint", "epaint",
@ -694,7 +694,7 @@ dependencies = [
[[package]] [[package]]
name = "egui-winit" name = "egui-winit"
version = "0.18.0" version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"arboard", "arboard",
"egui", "egui",
@ -707,7 +707,7 @@ dependencies = [
[[package]] [[package]]
name = "egui_glow" name = "egui_glow"
version = "0.18.0" version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"egui", "egui",
@ -727,7 +727,7 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]] [[package]]
name = "emath" name = "emath"
version = "0.18.0" version = "0.18.0"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
] ]
@ -735,7 +735,7 @@ dependencies = [
[[package]] [[package]]
name = "epaint" name = "epaint"
version = "0.18.1" version = "0.18.1"
source = "git+https://github.com/Titaniumtown/egui.git#a672934d74c2b5c3c455421bbc2c6a2a40519c1e" source = "git+https://github.com/Titaniumtown/egui.git#737aedad397d32299f514cb63228512c37674404"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"ahash", "ahash",

View File

@ -147,8 +147,6 @@ impl MathApp {
.read_to_end(&mut tar_file_data) .read_to_end(&mut tar_file_data)
.expect("failed to read assets"); .expect("failed to read assets");
let mut tar_archive = tar::Archive::new(&*tar_file_data);
// Stores fonts // Stores fonts
let mut font_ubuntu_light: Option<FontData> = None; let mut font_ubuntu_light: Option<FontData> = None;
let mut font_notoemoji: Option<FontData> = None; let mut font_notoemoji: Option<FontData> = None;
@ -159,12 +157,17 @@ impl MathApp {
let mut text_data: Option<TextData> = None; let mut text_data: Option<TextData> = None;
tracing::info!("Reading assets..."); tracing::info!("Reading assets...");
// Iterate through all entries in the tarball // Iterate through all entries in the tarball
for file in tar_archive.entries().unwrap() { for file in unsafe {
let mut file = file.unwrap(); tar::Archive::new(&*tar_file_data)
.entries()
.unwrap_unchecked()
} {
let mut file = unsafe { file.unwrap_unchecked() };
let mut data: Vec<u8> = Vec::new(); let mut data: Vec<u8> = Vec::new();
file.read_to_end(&mut data).unwrap(); unsafe { file.read_to_end(&mut data).unwrap_unchecked() };
let path = file.header().path().unwrap(); let path = unsafe { file.header().path().unwrap_unchecked() };
let path_string = path.to_string_lossy(); let path_string = path.to_string_lossy();
tracing::debug!("Loading file: {}", path_string); tracing::debug!("Loading file: {}", path_string);