[rust] bugfix & a couple of minor updates

This commit is contained in:
joseLuís 2021-05-05 20:34:04 +02:00
parent b7bfbb0f90
commit aa0e242a7a
2 changed files with 10 additions and 4 deletions

View File

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

View File

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