Skip to content

Commit 8feb3f0

Browse files
committed
Only rename to camelCase on serialisation
1 parent 8b52caf commit 8feb3f0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

crates/amalthea/src/comm/frontend_comm.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub type CallMethodResult = serde_json::Value;
1717

1818
/// Parameters for the CallMethod method.
1919
#[derive(Debug, Serialize, Deserialize, PartialEq)]
20-
#[serde(rename_all = "camelCase")]
20+
#[serde(rename_all(serialize = "camelCase"))]
2121
pub struct CallMethodParams {
2222
/// The method to call inside the interpreter
2323
pub method: String,
@@ -28,23 +28,23 @@ pub struct CallMethodParams {
2828

2929
/// Parameters for the Busy method.
3030
#[derive(Debug, Serialize, Deserialize, PartialEq)]
31-
#[serde(rename_all = "camelCase")]
31+
#[serde(rename_all(serialize = "camelCase"))]
3232
pub struct BusyParams {
3333
/// Whether the backend is busy
3434
pub busy: bool,
3535
}
3636

3737
/// Parameters for the ShowMessage method.
3838
#[derive(Debug, Serialize, Deserialize, PartialEq)]
39-
#[serde(rename_all = "camelCase")]
39+
#[serde(rename_all(serialize = "camelCase"))]
4040
pub struct ShowMessageParams {
4141
/// The message to show to the user.
4242
pub message: String,
4343
}
4444

4545
/// Parameters for the PromptState method.
4646
#[derive(Debug, Serialize, Deserialize, PartialEq)]
47-
#[serde(rename_all = "camelCase")]
47+
#[serde(rename_all(serialize = "camelCase"))]
4848
pub struct PromptStateParams {
4949
/// Prompt for primary input.
5050
pub input_prompt: String,
@@ -55,7 +55,7 @@ pub struct PromptStateParams {
5555

5656
/// Parameters for the WorkingDirectory method.
5757
#[derive(Debug, Serialize, Deserialize, PartialEq)]
58-
#[serde(rename_all = "camelCase")]
58+
#[serde(rename_all(serialize = "camelCase"))]
5959
pub struct WorkingDirectoryParams {
6060
/// The new working directory
6161
pub directory: String,

crates/amalthea/src/comm/help_comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ pub enum ShowHelpKind {
2424

2525
/// Parameters for the ShowHelpTopic method.
2626
#[derive(Debug, Serialize, Deserialize, PartialEq)]
27-
#[serde(rename_all = "camelCase")]
27+
#[serde(rename_all(serialize = "camelCase"))]
2828
pub struct ShowHelpTopicParams {
2929
/// The help topic to show
3030
pub topic: String,
3131
}
3232

3333
/// Parameters for the ShowHelp method.
3434
#[derive(Debug, Serialize, Deserialize, PartialEq)]
35-
#[serde(rename_all = "camelCase")]
35+
#[serde(rename_all(serialize = "camelCase"))]
3636
pub struct ShowHelpParams {
3737
/// The help content to show
3838
pub content: String,

crates/amalthea/src/comm/plot_comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use serde::Serialize;
1111

1212
/// A rendered plot
1313
#[derive(Debug, Serialize, Deserialize, PartialEq)]
14-
#[serde(rename_all = "camelCase")]
14+
#[serde(rename_all(serialize = "camelCase"))]
1515
pub struct PlotResult {
1616
/// The plot data, as a base64-encoded string
1717
pub data: String,
@@ -22,7 +22,7 @@ pub struct PlotResult {
2222

2323
/// Parameters for the Render method.
2424
#[derive(Debug, Serialize, Deserialize, PartialEq)]
25-
#[serde(rename_all = "camelCase")]
25+
#[serde(rename_all(serialize = "camelCase"))]
2626
pub struct RenderParams {
2727
/// The requested plot height, in pixels
2828
pub height: i64,

0 commit comments

Comments
 (0)