From b13a269dd5ec85cd1549e7b82d9035b1fa8b5347 Mon Sep 17 00:00:00 2001 From: hkalbasi Date: Sat, 8 Jan 2022 10:58:04 +0330 Subject: [PATCH 1/2] add playground --- playground.html | 103 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 playground.html diff --git a/playground.html b/playground.html new file mode 100644 index 00000000..e5a6ee75 --- /dev/null +++ b/playground.html @@ -0,0 +1,103 @@ + + + + + + + + +

Serde Playground

+
+
+#[derive(Serialize)] +enum E { + W { a: Option<i32>, b: i32 }, + X(i32, i32), + Y(i32), + Z, +} + +E::W { a: None, b: 7 } +
+
+ +
+ +
+
+
+ + + + + + + + \ No newline at end of file From 77e142652e35efea9299e8ec21b44cef4b8bcf3f Mon Sep 17 00:00:00 2001 From: HKalbasi <45197576+HKalbasi@users.noreply.github.com> Date: Thu, 17 Feb 2022 11:30:57 +0330 Subject: [PATCH 2/2] Add json header --- playground.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playground.html b/playground.html index e5a6ee75..3d4d1e98 100644 --- a/playground.html +++ b/playground.html @@ -78,6 +78,9 @@

Serde Playground

`; const res = await fetch("https://play.rust-lang.org/execute", { method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, body: JSON.stringify({ code, channel: 'stable', @@ -100,4 +103,4 @@

Serde Playground

- \ No newline at end of file +