formatting

This commit is contained in:
2022-03-12 14:07:33 +01:00
parent 44f43dbc2c
commit 19022e7cb5
8 changed files with 143 additions and 143 deletions

View File

@@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone)]
pub struct Note {
pub meta: String,
pub contents: String,
pub views: Option<u32>,
pub expiration: Option<u32>,
pub meta: String,
pub contents: String,
pub views: Option<u32>,
pub expiration: Option<u32>,
}
#[derive(Serialize, Deserialize, Clone)]
@@ -15,13 +15,13 @@ pub struct NoteInfo {}
#[derive(Serialize, Deserialize, Clone)]
pub struct NotePublic {
pub meta: String,
pub contents: String,
pub meta: String,
pub contents: String,
}
pub fn generate_id() -> String {
let mut id: [u8; 32] = [0; 32];
let sr = ring::rand::SystemRandom::new();
let _ = sr.fill(&mut id);
return bs62::encode_data(&id);
let mut id: [u8; 32] = [0; 32];
let sr = ring::rand::SystemRandom::new();
let _ = sr.fill(&mut id);
return bs62::encode_data(&id);
}