features, cargo fmt
This commit is contained in:
		
							parent
							
								
									ef7690b6b2
								
							
						
					
					
						commit
						8ea511a33a
					
				
					 9 changed files with 25 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,8 @@
 | 
			
		|||
use crate::byte_slice::ByteSlice;
 | 
			
		||||
use crate::{heap_drop, heap_move, heap_move_nonnull, heap_remove, SPBitVec};
 | 
			
		||||
use servicepoint::{Bitmap, BitmapCommand, CompressionCode, DataRef, Grid, Origin, Packet};
 | 
			
		||||
use servicepoint::{
 | 
			
		||||
    Bitmap, BitmapCommand, CompressionCode, DataRef, Grid, Origin, Packet,
 | 
			
		||||
};
 | 
			
		||||
use std::ptr::NonNull;
 | 
			
		||||
 | 
			
		||||
/// Creates a new [Bitmap] with the specified dimensions.
 | 
			
		||||
| 
						 | 
				
			
			@ -210,7 +212,7 @@ pub unsafe extern "C" fn sp_bitmap_into_packet(
 | 
			
		|||
    bitmap: NonNull<Bitmap>,
 | 
			
		||||
    x: usize,
 | 
			
		||||
    y: usize,
 | 
			
		||||
    compression: CompressionCode
 | 
			
		||||
    compression: CompressionCode,
 | 
			
		||||
) -> *mut Packet {
 | 
			
		||||
    let bitmap = unsafe { heap_remove(bitmap) };
 | 
			
		||||
    match Packet::try_from(BitmapCommand {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,7 @@
 | 
			
		|||
use crate::{heap_drop, heap_move, heap_move_nonnull, heap_remove, ByteSlice};
 | 
			
		||||
use servicepoint::{BinaryOperation, BitVecCommand, BitVecU8Msb0, CompressionCode, Packet};
 | 
			
		||||
use servicepoint::{
 | 
			
		||||
    BinaryOperation, BitVecCommand, BitVecU8Msb0, CompressionCode, Packet,
 | 
			
		||||
};
 | 
			
		||||
use std::ptr::NonNull;
 | 
			
		||||
 | 
			
		||||
/// A vector of bits
 | 
			
		||||
| 
						 | 
				
			
			@ -157,7 +159,7 @@ pub unsafe extern "C" fn sp_bitvec_into_packet(
 | 
			
		|||
    bitvec: NonNull<SPBitVec>,
 | 
			
		||||
    offset: usize,
 | 
			
		||||
    operation: BinaryOperation,
 | 
			
		||||
    compression: CompressionCode
 | 
			
		||||
    compression: CompressionCode,
 | 
			
		||||
) -> *mut Packet {
 | 
			
		||||
    let bitvec = unsafe { heap_remove(bitvec) }.0;
 | 
			
		||||
    match Packet::try_from(BitVecCommand {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +0,0 @@
 | 
			
		|||
mod typed;
 | 
			
		||||
 | 
			
		||||
pub use typed::*;
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,7 @@
 | 
			
		|||
use crate::{heap_drop, heap_move, heap_move_nonnull, heap_remove, ByteSlice};
 | 
			
		||||
use servicepoint::{Cp437Grid, Cp437GridCommand, DataRef, Grid, Origin, Packet};
 | 
			
		||||
use servicepoint::{
 | 
			
		||||
    Cp437Grid, Cp437GridCommand, DataRef, Grid, Origin, Packet,
 | 
			
		||||
};
 | 
			
		||||
use std::ptr::NonNull;
 | 
			
		||||
 | 
			
		||||
/// Creates a new [Cp437Grid] with the specified dimensions.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								src/lib.rs
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/lib.rs
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -30,22 +30,26 @@ pub use crate::bitvec::*;
 | 
			
		|||
pub use crate::brightness_grid::*;
 | 
			
		||||
pub use crate::byte_slice::*;
 | 
			
		||||
pub use crate::char_grid::*;
 | 
			
		||||
pub use crate::commands::*;
 | 
			
		||||
pub use crate::connection::*;
 | 
			
		||||
pub use crate::cp437_grid::*;
 | 
			
		||||
pub use crate::packet::*;
 | 
			
		||||
pub use servicepoint::CommandCode;
 | 
			
		||||
use std::ptr::NonNull;
 | 
			
		||||
pub use typed_command::*;
 | 
			
		||||
 | 
			
		||||
mod bitmap;
 | 
			
		||||
mod bitvec;
 | 
			
		||||
mod brightness_grid;
 | 
			
		||||
mod byte_slice;
 | 
			
		||||
mod char_grid;
 | 
			
		||||
mod commands;
 | 
			
		||||
mod connection;
 | 
			
		||||
mod cp437_grid;
 | 
			
		||||
mod packet;
 | 
			
		||||
mod typed_command;
 | 
			
		||||
 | 
			
		||||
#[cfg(feature = "protocol_udp")]
 | 
			
		||||
mod udp;
 | 
			
		||||
 | 
			
		||||
#[cfg(feature = "protocol_udp")]
 | 
			
		||||
pub use udp::*;
 | 
			
		||||
 | 
			
		||||
use std::time::Duration;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue