update servicepoint to v0.16.0
Some checks failed
Rust / build-gnu-apt (pull_request) Failing after 1m0s
Rust / build-size-gnu-unstable (pull_request) Successful in 41s

This commit is contained in:
Vinzenz Schroeter 2025-07-12 13:02:12 +02:00
parent 0344c0bdcf
commit 90f1edb2c1
7 changed files with 16 additions and 22 deletions

View file

@ -1,7 +1,7 @@
use crate::{containers::ByteSlice, macros::wrap};
use servicepoint::{
Bitmap, BitmapCommand, CompressionCode, DataRef, DisplayBitVec, Grid,
Origin, Packet,
GridMut, Origin, Packet,
};
use std::ptr::NonNull;

View file

@ -1,7 +1,7 @@
use crate::{containers::ByteSlice, macros::wrap};
use servicepoint::{
Brightness, BrightnessGrid, BrightnessGridCommand, ByteGrid, DataRef, Grid,
Origin, Packet,
GridMut, Origin, Packet,
};
use std::{mem::transmute, ptr::NonNull};

View file

@ -1,5 +1,5 @@
use crate::{containers::ByteSlice, macros::wrap};
use servicepoint::{CharGrid, CharGridCommand, Grid, Origin, Packet};
use servicepoint::{CharGrid, CharGridCommand, Grid, GridMut, Origin, Packet};
use std::ptr::NonNull;
wrap! {
@ -25,8 +25,9 @@ wrap! {
/// Loads a [CharGrid] with the specified dimensions from the provided data.
///
/// returns: new CharGrid or NULL in case of an error
fn load(width: val usize, height: val usize, data: slice ByteSlice) -> move_ok *mut CharGrid {
CharGrid::load_utf8(width, height, data.to_vec())
fn load(width: val usize, height: val usize, data: slice ByteSlice) -> move_some *mut CharGrid {
String::from_utf8(data.to_vec()).ok()
.and_then(|s| CharGrid::load(width, height, &*s.chars().collect::<Vec<_>>()))
};
methods:
/// Returns the current value at the specified position.

View file

@ -1,6 +1,6 @@
use crate::{containers::ByteSlice, macros::wrap};
use servicepoint::{
Cp437Grid, Cp437GridCommand, DataRef, Grid, Origin, Packet,
Cp437Grid, Cp437GridCommand, DataRef, Grid, GridMut, Origin, Packet,
};
use std::ptr::NonNull;