mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 18:10:14 +01:00
change cbindgen sorting to None
This commit is contained in:
parent
2b54b944b5
commit
341c0ef2cd
|
@ -192,9 +192,7 @@ impl TryFrom<Packet> for Command {
|
||||||
fn try_from(packet: Packet) -> Result<Self, Self::Error> {
|
fn try_from(packet: Packet) -> Result<Self, Self::Error> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header: Header {
|
||||||
command_code,
|
command_code, a, ..
|
||||||
a,
|
|
||||||
..
|
|
||||||
},
|
},
|
||||||
..
|
..
|
||||||
} = packet;
|
} = packet;
|
||||||
|
@ -274,13 +272,14 @@ impl Command {
|
||||||
compression: CompressionCode,
|
compression: CompressionCode,
|
||||||
) -> Result<Command, TryFromPacketError> {
|
) -> Result<Command, TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
command_code: _,
|
Header {
|
||||||
a: tiles_x,
|
command_code: _,
|
||||||
b: pixels_y,
|
a: tiles_x,
|
||||||
c: tile_w,
|
b: pixels_y,
|
||||||
d: pixel_h,
|
c: tile_w,
|
||||||
},
|
d: pixel_h,
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
|
|
||||||
|
@ -306,13 +305,14 @@ impl Command {
|
||||||
command: Command,
|
command: Command,
|
||||||
) -> Result<Command, TryFromPacketError> {
|
) -> Result<Command, TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
command_code: _,
|
Header {
|
||||||
a,
|
command_code: _,
|
||||||
b,
|
a,
|
||||||
c,
|
b,
|
||||||
d,
|
c,
|
||||||
},
|
d,
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
if !payload.is_empty() {
|
if !payload.is_empty() {
|
||||||
|
@ -329,12 +329,13 @@ impl Command {
|
||||||
packet: Packet,
|
packet: Packet,
|
||||||
) -> Result<(SpBitVec, CompressionCode), TryFromPacketError> {
|
) -> Result<(SpBitVec, CompressionCode), TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
b: length,
|
Header {
|
||||||
c: sub,
|
b: length,
|
||||||
d: reserved,
|
c: sub,
|
||||||
..
|
d: reserved,
|
||||||
},
|
..
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
if reserved != 0 {
|
if reserved != 0 {
|
||||||
|
@ -363,13 +364,14 @@ impl Command {
|
||||||
packet: &Packet,
|
packet: &Packet,
|
||||||
) -> Result<Command, TryFromPacketError> {
|
) -> Result<Command, TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
command_code: _,
|
Header {
|
||||||
a: x,
|
command_code: _,
|
||||||
b: y,
|
a: x,
|
||||||
c: width,
|
b: y,
|
||||||
d: height,
|
c: width,
|
||||||
},
|
d: height,
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
|
|
||||||
|
@ -390,13 +392,14 @@ impl Command {
|
||||||
packet: &Packet,
|
packet: &Packet,
|
||||||
) -> Result<Command, TryFromPacketError> {
|
) -> Result<Command, TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
command_code: _,
|
Header {
|
||||||
a,
|
command_code: _,
|
||||||
b,
|
a,
|
||||||
c,
|
b,
|
||||||
d,
|
c,
|
||||||
},
|
d,
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
if payload.len() != 1 {
|
if payload.len() != 1 {
|
||||||
|
@ -420,13 +423,14 @@ impl Command {
|
||||||
packet: &Packet,
|
packet: &Packet,
|
||||||
) -> Result<Command, TryFromPacketError> {
|
) -> Result<Command, TryFromPacketError> {
|
||||||
let Packet {
|
let Packet {
|
||||||
header: Header {
|
header:
|
||||||
command_code: _,
|
Header {
|
||||||
a,
|
command_code: _,
|
||||||
b,
|
a,
|
||||||
c,
|
b,
|
||||||
d,
|
c,
|
||||||
},
|
d,
|
||||||
|
},
|
||||||
payload,
|
payload,
|
||||||
} = packet;
|
} = packet;
|
||||||
Ok(Command::Cp437Data(
|
Ok(Command::Cp437Data(
|
||||||
|
@ -662,7 +666,7 @@ mod tests {
|
||||||
PixelGrid::new(8, 8),
|
PixelGrid::new(8, 8),
|
||||||
compression,
|
compression,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
let Packet {
|
let Packet {
|
||||||
header,
|
header,
|
||||||
|
@ -692,7 +696,7 @@ mod tests {
|
||||||
BitVec::repeat(false, 8),
|
BitVec::repeat(false, 8),
|
||||||
compression,
|
compression,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
let Packet {
|
let Packet {
|
||||||
header,
|
header,
|
||||||
mut payload,
|
mut payload,
|
||||||
|
@ -752,7 +756,7 @@ mod tests {
|
||||||
BitVec::repeat(false, 8),
|
BitVec::repeat(false, 8),
|
||||||
CompressionCode::Uncompressed,
|
CompressionCode::Uncompressed,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
let Header {
|
let Header {
|
||||||
command_code: command,
|
command_code: command,
|
||||||
a: offset,
|
a: offset,
|
||||||
|
@ -783,7 +787,7 @@ mod tests {
|
||||||
BitVec::repeat(false, 8),
|
BitVec::repeat(false, 8),
|
||||||
CompressionCode::Uncompressed,
|
CompressionCode::Uncompressed,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
let Header {
|
let Header {
|
||||||
command_code: command,
|
command_code: command,
|
||||||
a: offset,
|
a: offset,
|
||||||
|
@ -814,7 +818,7 @@ mod tests {
|
||||||
BitVec::repeat(false, 8),
|
BitVec::repeat(false, 8),
|
||||||
CompressionCode::Uncompressed,
|
CompressionCode::Uncompressed,
|
||||||
)
|
)
|
||||||
.into();
|
.into();
|
||||||
let Header {
|
let Header {
|
||||||
command_code: command,
|
command_code: command,
|
||||||
a: offset,
|
a: offset,
|
||||||
|
|
|
@ -2,6 +2,8 @@ language = "C"
|
||||||
include_version = true
|
include_version = true
|
||||||
cpp_compat = true
|
cpp_compat = true
|
||||||
|
|
||||||
|
autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
|
||||||
|
|
||||||
############################ Code Style Options ################################
|
############################ Code Style Options ################################
|
||||||
|
|
||||||
braces = "SameLine"
|
braces = "SameLine"
|
||||||
|
@ -15,7 +17,7 @@ line_endings = "LF"
|
||||||
############################# Codegen Options ##################################
|
############################# Codegen Options ##################################
|
||||||
|
|
||||||
style = "both"
|
style = "both"
|
||||||
sort_by = "Name"
|
sort_by = "None"
|
||||||
usize_is_size_t = true
|
usize_is_size_t = true
|
||||||
|
|
||||||
[parse]
|
[parse]
|
||||||
|
@ -23,3 +25,7 @@ parse_deps = false
|
||||||
|
|
||||||
[parse.expand]
|
[parse.expand]
|
||||||
all_features = true
|
all_features = true
|
||||||
|
|
||||||
|
[export]
|
||||||
|
include = []
|
||||||
|
exclude = []
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,30 +26,22 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
pub use bit_vec::*;
|
pub use crate::bit_vec::*;
|
||||||
pub use brightness_grid::*;
|
pub use crate::brightness_grid::*;
|
||||||
pub use byte_slice::*;
|
pub use crate::byte_slice::*;
|
||||||
pub use command::*;
|
pub use crate::command::*;
|
||||||
pub use connection::*;
|
pub use crate::connection::*;
|
||||||
pub use constants::*;
|
pub use crate::constants::*;
|
||||||
pub use cp437_grid::*;
|
pub use crate::cp437_grid::*;
|
||||||
pub use packet::*;
|
pub use crate::packet::*;
|
||||||
pub use pixel_grid::*;
|
pub use crate::pixel_grid::*;
|
||||||
|
|
||||||
mod bit_vec;
|
mod bit_vec;
|
||||||
|
|
||||||
mod brightness_grid;
|
mod brightness_grid;
|
||||||
|
|
||||||
mod command;
|
|
||||||
|
|
||||||
mod connection;
|
|
||||||
|
|
||||||
mod packet;
|
|
||||||
|
|
||||||
mod pixel_grid;
|
|
||||||
|
|
||||||
mod byte_slice;
|
mod byte_slice;
|
||||||
|
mod command;
|
||||||
mod cp437_grid;
|
mod connection;
|
||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
|
mod cp437_grid;
|
||||||
|
mod packet;
|
||||||
|
mod pixel_grid;
|
||||||
|
|
Loading…
Reference in a new issue