perf: add back zero-copy decode for mai 1.50

This commit is contained in:
mokurin000
2025-07-31 12:36:59 +08:00
parent ca4761f83a
commit f2d0daf60d
2 changed files with 7 additions and 20 deletions

View File

@@ -25,7 +25,7 @@ pub trait MaiVersion {
pub trait MaiVersionExt: MaiVersion {
fn encode(data: impl AsRef<[u8]>) -> Result<Vec<u8>, ApiError>;
fn decode(data: impl AsRef<[u8]>) -> Result<Vec<u8>, ApiError>;
fn decode(data: impl AsMut<[u8]>) -> Result<Vec<u8>, ApiError>;
fn api_hash(api: APIMethod) -> String {
let api_name: &str = api.into();