ppc

Results 7 comments of ppc

tried #[derive(Debug, Serialize, Deserialize)] #[serde(tag = "kind", content = "data")] #[serde(rename_all = "snake_case")] pub enum B { First(i64), Second(i64) } or #[derive(Debug, Serialize, Deserialize)] #[serde(tag = "kind")] #[serde(rename_all = "snake_case")]...

https://crates.io/crates/const_num_bigint

@cuviper need ```pub fn biguint_from_vec(digits: Vec) -> BigUint ``` like [#https://github.com/rust-num/num-bigint/issues/181#issuecomment-985698108](https://github.com/rust-num/num-bigint/blob/e77ffacafef7e8fa2c2b990489b7aa30dceaed64/src/biguint.rs#L514) but this is pub(crate)

@cuviper convert ``` &'static ConstVec``` to ```&'static Vec``` by ```Vec::from_raw_parts``` and convert ```&'static ConstBigUint``` to ```&'static BigUint``` by ```Vec::from_raw_parts``` and ```biguint_from_vec```

@cuviper ``` use std::mem::ManuallyDrop; #[derive(Debug)] struct ConstFoo(&'static [u8]); #[derive(Debug)] struct Foo(Vec); impl ConstFoo { #[inline] pub fn get(&'static self)->ManuallyDrop{ ManuallyDrop::new(unsafe{Foo( Vec::from_raw_parts(self.0.as_ptr() as *mut u8,self.0.len(),self.0.len()) )}) } } const FOO :...

like this? https://crates.io/crates/async_once