Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The scope of the unsafe block can be appropriately reduced #273

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peamaeq
Copy link

@peamaeq peamaeq commented Jun 23, 2022

No description provided.

Copy link
Member

@dwrensha dwrensha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please fix up the formatting on these changes?

}
let p: *mut u8 = result.as_mut_ptr() as *mut u8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the indentation is wrong here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #305

@@ -2727,16 +2727,16 @@ impl <'a> PointerBuilder<'a> {
wire_helpers::set_struct_pointer(
self.arena,
self.segment_id, self.cap_table, self.pointer, *value, canonicalize)?;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

}

pub fn set_list(&self, value: &ListReader, canonicalize: bool) -> Result<()> {
unsafe {
wire_helpers::set_list_pointer(self.arena, self.segment_id,
self.cap_table, self.pointer, *value, canonicalize)?;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@@ -3102,33 +3102,33 @@ impl <'a> StructBuilder<'a> {
return Ok(())
}

unsafe {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove this unsafe block then the following lines should be less indented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants