From 246a8c653601a22cf62abc59ae29124ce2a889e2 Mon Sep 17 00:00:00 2001 From: Putta Khunchalee Date: Sun, 22 Sep 2024 23:22:32 +0700 Subject: [PATCH] Requires Rust 1.81 --- Cargo.toml | 3 ++- testing/src/qemu/mod.rs | 18 +----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 98d0e41..bff4740 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,9 @@ name = "zfi" description = "Zero-cost and safe interface to UEFI firmware" version = "0.2.0" license = "MIT" -repository = "https://github.com/ultimicro/zfi" +repository = "https://github.com/ultimaweapon/zfi" edition = "2021" +rust-version = "1.81" [dependencies] bitflags = "2.4" diff --git a/testing/src/qemu/mod.rs b/testing/src/qemu/mod.rs index 92cd444..5a2eb0a 100644 --- a/testing/src/qemu/mod.rs +++ b/testing/src/qemu/mod.rs @@ -116,23 +116,7 @@ pub fn gen_qemu_test(proj: PathBuf, mut root: PathBuf, name: &str, body: &str) - r#" ::zfi::println!("zfi:panic:{{}}:{{}}:{{}}", l.file(), l.line(), l.column());"# ) .unwrap(); - writeln!(data).unwrap(); - writeln!( - data, - r#" if let Some(&p) = i.payload().downcast_ref::<&str>() {{"# - ) - .unwrap(); - writeln!(data, r#" ::zfi::println!("{{p}}");"#).unwrap(); - writeln!( - data, - r#" }} else if let Some(p) = i.payload().downcast_ref::<::alloc::string::String>() {{"# - ) - .unwrap(); - writeln!(data, r#" ::zfi::println!("{{p}}");"#).unwrap(); - writeln!(data, r#" }} else {{"#).unwrap(); - writeln!(data, r#" ::zfi::println!("{{i}}");"#).unwrap(); - writeln!(data, r#" }}"#).unwrap(); - writeln!(data).unwrap(); + writeln!(data, r#" ::zfi::println!("{{}}", i.message());"#).unwrap(); writeln!(data, r#" ::zfi::println!("zfi:end");"#).unwrap(); writeln!(data).unwrap(); writeln!(data, r#" loop {{}}"#).unwrap();