Skip to content

Commit 6f25dd5

Browse files
committed
feat: v0.1.0
1 parent 1e6cfea commit 6f25dd5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "bin-encode-decode"
3-
version = "0.0.3"
4-
edition = "2021"
3+
version = "0.1.0"
4+
edition = "2024"
55
authors = ["ltpp-universe <root@ltpp.vip>"]
66
license = "MIT"
77
description = "A high-performance binary encode and decode library that supports customizable character sets beyond Base64."

src/common/error.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ impl fmt::Display for EncodeError {
99
#[inline]
1010
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1111
match self {
12-
EncodeError::CharsetError => write!(f, "EncodeError: Charset is invalid. Please ensure the charset contains exactly {} unique characters.",CHARSET_LEN ),
12+
EncodeError::CharsetError => write!(
13+
f,
14+
"EncodeError: Charset is invalid. Please ensure the charset contains exactly {} unique characters.",
15+
CHARSET_LEN
16+
),
1317
}
1418
}
1519
}
@@ -23,7 +27,11 @@ impl fmt::Display for DecodeError {
2327
#[inline]
2428
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2529
match self {
26-
DecodeError::CharsetError => write!(f, "DecodeError: Charset is invalid. Please ensure the charset contains exactly {} unique characters.", CHARSET_LEN),
30+
DecodeError::CharsetError => write!(
31+
f,
32+
"DecodeError: Charset is invalid. Please ensure the charset contains exactly {} unique characters.",
33+
CHARSET_LEN
34+
),
2735
}
2836
}
2937
}

0 commit comments

Comments
 (0)