mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
auto clippy fixes
This commit is contained in:
parent
72c85efc83
commit
ef39bad7c6
146 changed files with 750 additions and 1005 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue