clippy things

This commit is contained in:
Folkert 2020-12-01 23:11:24 +01:00
parent 5d00910a38
commit 674f336601
2 changed files with 5 additions and 3 deletions

View file

@ -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",
)