File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44// except according to those terms.
55
66use std:: convert:: TryFrom ;
7+ use std:: convert:: TryInto ;
78use std:: ffi;
89use std:: fmt;
910use std:: marker:: PhantomData ;
@@ -2216,7 +2217,7 @@ impl fmt::Display for CigarStringView {
22162217pub struct BaseModificationMetadata {
22172218 pub strand : i32 ,
22182219 pub implicit : i32 ,
2219- pub canonical : i8 ,
2220+ pub canonical : u8 ,
22202221}
22212222
22222223/// struct containing the internal state required to access
@@ -2314,7 +2315,8 @@ impl BaseModificationState<'_> {
23142315 unsafe {
23152316 let mut strand: i32 = 0 ;
23162317 let mut implicit: i32 = 0 ;
2317- let mut canonical: i8 = 0 ;
2318+ // This may be i8 or u8 in hts_sys.
2319+ let mut canonical: c_char = 0 ;
23182320
23192321 let ret = hts_sys:: bam_mods_query_type (
23202322 self . state ,
@@ -2329,7 +2331,7 @@ impl BaseModificationState<'_> {
23292331 return Ok ( BaseModificationMetadata {
23302332 strand,
23312333 implicit,
2332- canonical,
2334+ canonical : canonical . try_into ( ) . unwrap ( ) ,
23332335 } ) ;
23342336 }
23352337 }
You can’t perform that action at this time.
0 commit comments