Remove some unused code

This commit is contained in:
Nicole Tietz-Sokolskaya 2024-06-02 11:31:49 -04:00
parent ef732e49fd
commit 808a97501d
3 changed files with 5 additions and 17 deletions

5
rustfmt.toml Normal file
View file

@ -0,0 +1,5 @@
imports_granularity = "Module"
group_imports = "StdExternalCrate"
wrap_comments = true
use_small_heuristics = "Max"
edition = "2021"

View file

@ -8,7 +8,6 @@ pub mod permissions;
pub mod prelude; pub mod prelude;
pub mod provider; pub mod provider;
pub mod schema; pub mod schema;
pub mod serialize;
pub mod server; pub mod server;
pub mod session; pub mod session;
pub mod templates; pub mod templates;

View file

@ -1,16 +0,0 @@
use bincode::{DefaultOptions, Options};
use serde::{Deserialize, Serialize};
fn bincode_options() -> impl Options {
DefaultOptions::new().with_big_endian()
}
pub fn serialize<T: ?Sized + Serialize>(value: &T) -> Result<Vec<u8>, bincode::Error> {
let options = bincode_options();
options.serialize(value)
}
pub fn deserialize<'a, T: Deserialize<'a>>(bytes: &'a [u8]) -> Result<T, bincode::Error> {
let options = bincode_options();
options.deserialize(bytes)
}