mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
clippy things
This commit is contained in:
parent
5d00910a38
commit
674f336601
2 changed files with 5 additions and 3 deletions
|
@ -1319,6 +1319,7 @@ pub fn list_keep_if_help<'a, 'ctx, 'env>(
|
|||
}
|
||||
|
||||
/// List.map : List before, (before -> after) -> List after
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn list_map<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
layout_ids: &mut LayoutIds<'a>,
|
||||
|
|
|
@ -143,13 +143,14 @@ fn zig_str_to_struct<'a, 'ctx, 'env>(
|
|||
|
||||
let ret_type = BasicTypeEnum::StructType(collection(env.context, env.ptr_bytes));
|
||||
|
||||
let foo = builder.build_alloca(zig_str_type, "zig_result");
|
||||
// a roundabout way of casting (LLVM does not accept a standard bitcast)
|
||||
let allocation = builder.build_alloca(zig_str_type, "zig_result");
|
||||
|
||||
builder.build_store(foo, zig_str);
|
||||
builder.build_store(allocation, zig_str);
|
||||
|
||||
let ptr3 = builder
|
||||
.build_bitcast(
|
||||
foo,
|
||||
allocation,
|
||||
env.context.i128_type().ptr_type(AddressSpace::Generic),
|
||||
"cast",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue