Created
September 30, 2023 16:37
-
-
Save matthewjberger/9b7ae58d1ee2f497f16f254dd6499cf2 to your computer and use it in GitHub Desktop.
Use serde Serialize and Deserialize attributes as re-exports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From: https://github.com/serde-rs/serde/issues/1465#issuecomment-800686252 | |
use common::serde::{self, Deserialize, Serialize} | |
#[derive(Copy, Clone, Debug, Deserialize, Serialize)] | |
#[serde(crate = "self::serde")] // must be below the derive attribute | |
struct Vertex { | |
position: [u32; 3], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment