Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix cargo fmt #85

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charming/src/element/border_type.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use serde::{Serialize, Deserialize};
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "snake_case")]
Expand Down
2 changes: 1 addition & 1 deletion charming/src/element/color.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::ser::{SerializeStruct, Serializer};
use serde::{Serialize, Deserialize};
use serde::{Deserialize, Serialize};

#[derive(Serialize)]
#[serde(rename_all = "snake_case")]
Expand Down
2 changes: 1 addition & 1 deletion charming/src/element/item_style.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use serde::{Serialize, Deserialize};
use super::{border_type::BorderType, color::Color};
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
Expand Down
2 changes: 1 addition & 1 deletion charming/src/element/text_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct TextStyle {

#[serde(skip_serializing_if = "Option::is_none")]
align: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
padding: Option<[f64; 4]>,
}
Expand Down
11 changes: 7 additions & 4 deletions charming/src/series/sankey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};

use crate::{
datatype::CompositeValue,
element::{Emphasis, Label, LineStyle, Orient, ItemStyle},
element::{Emphasis, ItemStyle, Label, LineStyle, Orient},
};

#[derive(Serialize)]
Expand All @@ -29,7 +29,10 @@ pub struct SankeyNode {
}

impl SankeyNode {
pub fn new<S>(name: S) -> Self where S: Into<String> {
pub fn new<S>(name: S) -> Self
where
S: Into<String>,
{
Self {
name: name.into(),
value: None,
Expand All @@ -54,8 +57,8 @@ impl SankeyNode {
}

impl<S> From<S> for SankeyNode
where
S: Into<String>,
where
S: Into<String>,
{
fn from(name: S) -> Self {
SankeyNode {
Expand Down
6 changes: 1 addition & 5 deletions gallery/src/line/line_gradient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ pub fn chart() -> Chart {
.max((data_list.len() - 1) as f64),
)
.x_axis(Axis::new().data(data_list.to_vec()))
.x_axis(
Axis::new()
.data(data_list.to_vec())
.grid_index(1),
)
.x_axis(Axis::new().data(data_list.to_vec()).grid_index(1))
.y_axis(Axis::new())
.y_axis(Axis::new().grid_index(1))
.grid(Grid::new().bottom("60%"))
Expand Down
Loading