Giter VIP home page Giter VIP logo

microserde's Introduction

microserde

Micro replacement for Serde that compiles much faster but keeps a lot of its functionality

microserde's People

Contributors

dsp avatar makepaddev avatar ryleysill93 avatar

Stargazers

Thibaut avatar Ankesh Bharti avatar F. Y. Gravel avatar Jonas Nyström avatar Price Smith avatar Jacky Song avatar Serge Klochkov avatar Tommy D. Rossi avatar Fidèle PALOUKI avatar David Craven avatar David Dias avatar

Watchers

James Cloos avatar David Tolnay avatar  avatar  avatar

Forkers

dsp

microserde's Issues

cargo fmt makes example not compile?

This was a very strange experience, but the example compiles if I go into the folder and do cargo run, but if I do cargo fmt and then cargo run I suddenly get compilation errors.

> cargo run
   Compiling microserde_example v0.1.0 (/home/erik/Documents/GitHub/microserde/example)
    Finished dev [unoptimized + debuginfo] target(s) in 0.20s
     Running `target/debug/microserde_example`
Bin len: 130
Bin roundtrip equality true
JSON Output {"a":1,"b":2,"c":[3],"e":{"One":[]},"f":{"Two":[4,5]},"g":{"Three":{"x":6,"y":7,}},"h":{"Four":{"w":8,}},"i":{"Four":{"z":9,"w":8,}},"j":"Hello","k":[10,11],"l":[1,2,3,4],"m":[2,3],}
JSON roundtrip equality true
(... and more )

> cargo fmt
> cargo run
   Compiling microserde_example v0.1.0 (/home/erik/Documents/GitHub/microserde/example)
error[E0277]: the trait bound `T: Clone` is not satisfied
 --> src/main.rs:5:10
  |
5 | #[derive(SerBin, DeBin, SerJson, DeJson, SerRon, DeRon, PartialEq)]
  |          ^^^^^^ the trait `Clone` is not implemented for `T`
  |
note: required by a bound in `MyStruct`
 --> src/main.rs:8:8
  |
6 | struct MyStruct<T>
  |        -------- required by a bound in this struct
7 | where
8 |     T: Clone,
  |        ^^^^^ required by this bound in `MyStruct`
  = note: this error originates in the derive macro `SerBin` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider restricting type parameter `T`
  |
6 | struct MyStruct<T: std::clone::Clone>
  |                  +++++++++++++++++++

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.