Skip to content

Commit

Permalink
reformat longer lines
Browse files Browse the repository at this point in the history
  • Loading branch information
cschin committed Oct 26, 2021
1 parent 4c92dd2 commit 643da98
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/bcf/record.rs
Expand Up @@ -317,7 +317,11 @@ impl Record {
pub fn set_id(&mut self, id: &[u8]) -> Result<()> {
let c_str = ffi::CString::new(id).unwrap();
if unsafe {
htslib::bcf_update_id(self.header().inner, self.inner, c_str.as_ptr() as *mut c_char)
htslib::bcf_update_id(
self.header().inner,
self.inner,
c_str.as_ptr() as *mut c_char,
)
} == 0
{
Ok(())
Expand All @@ -330,7 +334,11 @@ impl Record {
pub fn clear_id(&mut self) -> Result<()> {
let c_str = ffi::CString::new(&b"."[..]).unwrap();
if unsafe {
htslib::bcf_update_id(self.header().inner, self.inner, c_str.as_ptr() as *mut c_char)
htslib::bcf_update_id(
self.header().inner,
self.inner,
c_str.as_ptr() as *mut c_char,
)
} == 0
{
Ok(())
Expand All @@ -342,8 +350,13 @@ impl Record {
/// Add the ID string (the ID field is semicolon-separated), checking for duplicates.
pub fn push_id(&mut self, id: &[u8]) -> Result<()> {
let c_str = ffi::CString::new(id).unwrap();
if unsafe { htslib::bcf_add_id(self.header().inner, self.inner, c_str.as_ptr() as *mut c_char) }
== 0
if unsafe {
htslib::bcf_add_id(
self.header().inner,
self.inner,
c_str.as_ptr() as *mut c_char,
)
} == 0
{
Ok(())
} else {
Expand Down

0 comments on commit 643da98

Please sign in to comment.