From 7fa89b45da567af5a0c5ef7b589a989082b82848 Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 17 Nov 2020 23:06:59 -0500 Subject: [PATCH] rust: unfuck ncaligns #1115 --- rust/src/plane.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/src/plane.rs b/rust/src/plane.rs index 528427e8b..2a88ba601 100644 --- a/rust/src/plane.rs +++ b/rust/src/plane.rs @@ -175,7 +175,7 @@ use crate::{ impl NcPlaneOptions { /// `NcPlaneOptions` simple constructor with horizontal x - pub fn new(y: i32, x: u32, rows: u32, cols: u32) -> Self { + pub fn new(y: i32, x: i32, rows: u32, cols: u32) -> Self { Self::with_all_options(y, x, rows, cols, 0) } @@ -183,7 +183,7 @@ impl NcPlaneOptions { pub fn new_halign(y: i32, align: NcAlign, rows: u32, cols: u32) -> Self { Self::with_all_options( y, - align, + align as i32, rows, cols, NCPLANE_OPTION_HORALIGNED, @@ -191,10 +191,10 @@ impl NcPlaneOptions { } /// `NcplaneOptions` constructor - pub fn with_all_options(y: i32, align: NcAlign, rows: u32, cols: u32, flags: u64) -> Self { + pub fn with_all_options(y: i32, x: i32, rows: u32, cols: u32, flags: u64) -> Self { NcPlaneOptions { y, - x: align as i32, + x, rows: rows as i32, cols: cols as i32, userptr: null_mut(),