* Create a minimalistic toast
* Profile editing (WIP)
This commit is contained in:
parent
327b2d0a5b
commit
1c79cc890d
25 changed files with 1133 additions and 575 deletions
|
|
@ -9,4 +9,4 @@ regex = "1"
|
|||
lazy_static = "1"
|
||||
|
||||
ron = "0.8"
|
||||
serde = {version = "1.0", features = ["derive"]}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use ron::{
|
||||
de::from_bytes,
|
||||
ser::{to_string_pretty, PrettyConfig},
|
||||
};
|
||||
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||
|
||||
///// RECIPE /////
|
||||
|
||||
|
|
@ -102,3 +106,11 @@ pub struct UpdateProfile {
|
|||
pub email: Option<String>,
|
||||
pub password: Option<String>,
|
||||
}
|
||||
|
||||
pub fn to_string<T>(ron: T) -> String
|
||||
where
|
||||
T: Serialize,
|
||||
{
|
||||
// TODO: handle'unwrap'.
|
||||
to_string_pretty(&ron, PrettyConfig::new()).unwrap()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue