[rust] bugfix & a couple of minor updates

pull/1637/head
joseLuís 3 years ago
parent b7bfbb0f90
commit aa0e242a7a

@ -205,7 +205,7 @@ macro_rules! error_ref_mut {
#[macro_export] #[macro_export]
macro_rules! error_str { macro_rules! error_str {
($str:expr, $msg:expr) => { ($str:expr, $msg:expr) => {
if $str.is_null() { if !$str.is_null() {
#[allow(unused_unsafe)] #[allow(unused_unsafe)]
return Ok(unsafe { (&*$str).to_string() }); return Ok(unsafe { (&*$str).to_string() });
} else { } else {

@ -118,7 +118,10 @@ impl NcVisual {
cols as i32, cols as i32,
) )
}, },
"NcVisual::from_bgra()" &format![
"NcVisual::from_bgra(bgra, {}, {}, {})",
rows, rowstride, cols
]
] ]
} }
@ -163,7 +166,7 @@ impl NcVisual {
) )
}, },
&format!( &format!(
"NcVisual::from_file({}, {}, {}, {}, {})", "NcVisual::from_file(plane, {}, {}, {}, {}, {})",
blitter, beg_y, beg_x, len_y, len_x blitter, beg_y, beg_x, len_y, len_x
) )
] ]
@ -195,7 +198,10 @@ impl NcVisual {
cols as i32, cols as i32,
) )
}, },
&format!("NcVisual::from_rgba({}, {}, {})", rows, rowstride, cols) &format!(
"NcVisual::from_rgba(rgba, {}, {}, {})",
rows, rowstride, cols
)
] ]
} }

Loading…
Cancel
Save