Skip to content

Commit

Permalink
chore: make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Dec 19, 2024
1 parent 1ac1b1b commit a9f1bc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/ast/ctx/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@ impl<'a, 'ctx> Ctx<'a> {
if let PLType::Union(u) = &*target_pltype.borrow() {
let mut union_members = vec![];
for tp in &u.sum_types {
let tp = self.run_in_type_mod(u, |ctx,u|{
tp.get_type(ctx, builder, true)
})?;
let tp = self.run_in_type_mod(u, |ctx, _| tp.get_type(ctx, builder, true))?;
union_members.push(tp);
}
for (i, tp) in union_members.iter().enumerate() {
Expand Down
6 changes: 2 additions & 4 deletions vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,19 @@ fn vm_ftoa(f: f32, rec: *mut u8) {
}

#[is_runtime]
fn new_thread(f: *mut i128, sp:*mut u8) {
fn new_thread(f: *mut i128, sp: *mut u8) {

Check warning on line 94 in vm/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

vm/src/lib.rs#L94

Added line #L94 was not covered by tests
// f's first 8 byte is fn pointer, next 8 byte is data pointer
let ptr = f as *const i64;
let f_ptr = ptr as *const extern "C" fn(i64);
let data_ptr = unsafe { *ptr.offset(1) };
let func = unsafe { *f_ptr };
let (s, r) = channel::<()>();
let ptr_i = ptr as i64;
// let ptr_i = ptr as i64;
immix::pin(data_ptr as _);
// immix::gc_keep_live(data_ptr as _);

Check warning on line 103 in vm/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

vm/src/lib.rs#L101-L103

Added lines #L101 - L103 were not covered by tests
// immix::gc_add_root(data_ptr as *mut _, ObjectType::Pointer.int_value());
let c = move || {
// thread::sleep(std::time::Duration::from_secs(1));
let sp = immix::Collector::current_sp();
immix::set_high_sp(sp);
// immix::gc_keep_live(data_ptr as _);

Check warning on line 107 in vm/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

vm/src/lib.rs#L107

Added line #L107 was not covered by tests
// immix::set_evacuation(false);
// immix::gc_add_root(&mut f as *mut _ as *mut _, ObjectType::Trait.int_value());
Expand Down

0 comments on commit a9f1bc4

Please sign in to comment.