auto clippy fixes

This commit is contained in:
Folkert 2023-06-26 20:42:50 +02:00
parent 72c85efc83
commit ef39bad7c6
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
146 changed files with 750 additions and 1005 deletions

View file

@ -14,8 +14,8 @@ const OBJECT_EXTENSION: &str = "obj";
fn main() {
println!("cargo:rerun-if-changed=build.rs");
let source_path = format!("src/{}.c", PLATFORM_FILENAME);
println!("cargo:rerun-if-changed={}", source_path);
let source_path = format!("src/{PLATFORM_FILENAME}.c");
println!("cargo:rerun-if-changed={source_path}");
// Zig can produce *either* an object containing relocations OR an object containing libc code
// But we want both, so we have to compile twice with different flags, then link them
@ -51,9 +51,9 @@ fn main() {
// (and thus deleted) before the Zig process is done using it!
let _ = builtins_host_tempfile;
assert!(output.status.success(), "{:#?}", output);
assert!(output.stdout.is_empty(), "{:#?}", output);
assert!(output.stderr.is_empty(), "{:#?}", output);
assert!(output.status.success(), "{output:#?}");
assert!(output.stdout.is_empty(), "{output:#?}");
assert!(output.stderr.is_empty(), "{output:#?}");
}
fn zig_executable() -> String {

View file

@ -233,7 +233,7 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
let (_, main_fn_layout) = match procedures.keys().find(|(s, _)| *s == main_fn_symbol) {
Some(layout) => *layout,
None => return Ok(format!("<function> : {}", expr_type_str)),
None => return Ok(format!("<function> : {expr_type_str}")),
};
let app_module_bytes = {
@ -280,7 +280,7 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
// Send the compiled binary out to JS and create an executable instance from it
js_create_app(&app_module_bytes)
.await
.map_err(|js| format!("{:?}", js))?;
.map_err(|js| format!("{js:?}"))?;
let mut app = WasmReplApp { arena };