mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
rust: fix clippy compat with bindgen
and fix a couple of lints in plane.rs
This commit is contained in:
parent
4b9a8d130f
commit
6cfd3d6ad7
@ -3,6 +3,15 @@
|
||||
#![allow(non_snake_case)]
|
||||
#![no_std]
|
||||
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
|
||||
// see https://github.com/rust-lang/rust-bindgen/issues/1470
|
||||
#[allow(clippy::all)]
|
||||
mod bindings {
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
}
|
||||
pub use bindings::*;
|
||||
|
||||
mod cells;
|
||||
mod channel;
|
||||
mod key;
|
||||
@ -22,8 +31,6 @@ pub use pixel::*;
|
||||
pub use plane::*;
|
||||
pub use types::*;
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use core::ptr::{null, null_mut};
|
||||
|
@ -230,7 +230,7 @@ pub fn ncplane_dim_x(plane: &ncplane) -> i32 {
|
||||
unsafe {
|
||||
let mut x = 0;
|
||||
ffi::ncplane_dim_yx(plane, null_mut(), &mut x);
|
||||
return x;
|
||||
x
|
||||
}
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ pub fn ncplane_dim_y(plane: &ncplane) -> i32 {
|
||||
unsafe {
|
||||
let mut y = 0;
|
||||
ffi::ncplane_dim_yx(plane, &mut y, null_mut());
|
||||
return y;
|
||||
y
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ pub fn ncplane_perimeter(plane: &mut ncplane, ul: &cell, ur: &cell, ll: &cell, l
|
||||
///
|
||||
// TODO: TEST
|
||||
#[inline]
|
||||
pub fn ncplane_putstr(plane: *mut ncplane, _str: &str) -> i32 {
|
||||
pub fn ncplane_putstr(plane: &mut ncplane, _str: &str) -> i32 {
|
||||
unsafe {
|
||||
ffi::ncplane_putstr_yx(
|
||||
plane,
|
||||
|
Loading…
x
Reference in New Issue
Block a user