Skip to content

Commit 2fa60a9

Browse files
committed
feat: v0.2.1
1 parent f35db2d commit 2fa60a9

File tree

9 files changed

+22
-20
lines changed

9 files changed

+22
-20
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bin-encode-decode"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2024"
55
authors = ["ltpp-universe <root@ltpp.vip>"]
66
license = "MIT"

src/common/error/enum.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#[derive(Debug, Clone)]
2+
pub enum EncodeError {
3+
CharsetError,
4+
}
5+
6+
#[derive(Debug, Clone)]
7+
pub enum DecodeError {
8+
CharsetError,
9+
}
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
use crate::*;
2-
3-
#[derive(Debug, Clone)]
4-
pub enum EncodeError {
5-
CharsetError,
6-
}
1+
use super::*;
72

83
impl fmt::Display for EncodeError {
94
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -17,11 +12,6 @@ impl fmt::Display for EncodeError {
1712
}
1813
}
1914

20-
#[derive(Debug, Clone)]
21-
pub enum DecodeError {
22-
CharsetError,
23-
}
24-
2515
impl fmt::Display for DecodeError {
2616
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2717
match self {

src/common/error/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pub(crate) mod r#enum;
2+
pub(crate) mod r#impl;
3+
4+
pub use r#enum::*;
5+
6+
pub(super) use crate::*;
File renamed without changes.

src/decode/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#[cfg(test)]
22
pub(crate) mod cfg;
3-
pub(crate) mod func;
3+
pub(crate) mod r#fn;
File renamed without changes.

src/encode/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#[cfg(test)]
22
pub(crate) mod cfg;
3-
pub(crate) mod func;
3+
pub(crate) mod r#fn;

src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ pub(crate) mod common;
22
pub(crate) mod decode;
33
pub(crate) mod encode;
44

5-
pub use common::{
6-
error::{DecodeError, EncodeError},
7-
r#type::Endecode,
8-
};
9-
pub use decode::func::*;
10-
pub use encode::func::*;
5+
pub use common::{error::*, r#type::*};
6+
pub use decode::r#fn::*;
7+
pub use encode::r#fn::*;
118

129
pub(crate) use common::r#const::*;
1310
pub(crate) use std::{collections::HashSet, fmt};

0 commit comments

Comments
 (0)