Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
yuankunzhang committed Aug 8, 2024
1 parent 7bb6774 commit ee1a79d
Show file tree
Hide file tree
Showing 81 changed files with 657 additions and 46 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"charming",
"gallery",
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/angle_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ pub struct AngleAxis {
data: Vec<String>,
}

impl Default for AngleAxis {
fn default() -> Self {
Self::new()
}
}

impl AngleAxis {
pub fn new() -> Self {
Self {
Expand Down
18 changes: 18 additions & 0 deletions charming/src/component/aria.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ pub struct DecalItem {
max_tile_height: Option<f64>,
}

impl Default for DecalItem {
fn default() -> Self {
Self::new()
}
}

impl DecalItem {
pub fn new() -> DecalItem {
DecalItem {
Expand Down Expand Up @@ -141,6 +147,12 @@ pub struct Decal {
decals: Vec<DecalItem>,
}

impl Default for Decal {
fn default() -> Self {
Self::new()
}
}

impl Decal {
pub fn new() -> Decal {
Decal {
Expand Down Expand Up @@ -210,6 +222,12 @@ pub struct Aria {
decal: Option<Decal>,
}

impl Default for Aria {
fn default() -> Self {
Self::new()
}
}

impl Aria {
pub fn new() -> Aria {
Aria {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ pub struct Axis {
data: Vec<String>,
}

impl Default for Axis {
fn default() -> Self {
Self::new()
}
}

impl Axis {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/axis3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ pub struct Axis3D {
type_: Option<AxisType>,
}

impl Default for Axis3D {
fn default() -> Self {
Self::new()
}
}

impl Axis3D {
pub fn new() -> Self {
Self { type_: None }
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/data_zoom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ pub struct DataZoom {
brush_select: Option<bool>,
}

impl Default for DataZoom {
fn default() -> Self {
Self::new()
}
}

impl DataZoom {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/geo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ pub struct Geo {
silent: Option<bool>,
}

impl Default for Geo {
fn default() -> Self {
Self::new()
}
}

impl Geo {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/geo_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ pub struct GeoMap {
opt: Option<GeoMapOpt>,
}

impl Default for GeoMap {
fn default() -> Self {
Self::new()
}
}

impl GeoMap {
pub fn new() -> Self {
GeoMap {
Expand Down
12 changes: 12 additions & 0 deletions charming/src/component/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ pub struct GridTooltip {
extra_css_text: Option<String>,
}

impl Default for GridTooltip {
fn default() -> Self {
Self::new()
}
}

impl GridTooltip {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -207,6 +213,12 @@ pub struct Grid {
tooltip: Option<GridTooltip>,
}

impl Default for Grid {
fn default() -> Self {
Self::new()
}
}

impl Grid {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/grid3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ use serde::Serialize;
#[serde(rename_all = "camelCase")]
pub struct Grid3D {}

impl Default for Grid3D {
fn default() -> Self {
Self::new()
}
}

impl Grid3D {
pub fn new() -> Self {
Self {}
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/legend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ pub struct Legend {
data: Vec<LegendItem>,
}

impl Default for Legend {
fn default() -> Self {
Self::new()
}
}

impl Legend {
pub fn new() -> Self {
Self {
Expand Down
4 changes: 0 additions & 4 deletions charming/src/component/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ pub use angle_axis::*;
pub use aria::*;
pub use axis::*;
pub use axis3d::*;
pub use brush::*;
pub use calendar::*;
pub use data_zoom::*;
pub use geo::*;
pub use geo_map::*;
pub use graphic::*;
pub use grid::*;
pub use grid3d::*;
pub use legend::*;
Expand All @@ -41,7 +38,6 @@ pub use polar_coordinate::*;
pub use radar_coordinate::*;
pub use radius_axis::*;
pub use single_axis::*;
pub use timeline::*;
pub use title::*;
pub use toolbox::*;
pub use visual_map::*;
6 changes: 6 additions & 0 deletions charming/src/component/parallel_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ pub struct ParallelAxis {
data: Vec<String>,
}

impl Default for ParallelAxis {
fn default() -> Self {
Self::new()
}
}

impl ParallelAxis {
pub fn new() -> Self {
Self {
Expand Down
12 changes: 12 additions & 0 deletions charming/src/component/parallel_coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ pub struct ParallelAxisDefault {
data: Vec<String>,
}

impl Default for ParallelAxisDefault {
fn default() -> Self {
Self::new()
}
}

impl ParallelAxisDefault {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -264,6 +270,12 @@ pub struct ParallelCoordinate {
parallel_axis_default: Option<ParallelAxisDefault>,
}

impl Default for ParallelCoordinate {
fn default() -> Self {
Self::new()
}
}

impl ParallelCoordinate {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/polar_coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ pub struct PolarCoordinate {
radius: Option<CompositeValue>,
}

impl Default for PolarCoordinate {
fn default() -> Self {
Self::new()
}
}

impl PolarCoordinate {
pub fn new() -> Self {
Self {
Expand Down
18 changes: 18 additions & 0 deletions charming/src/component/radar_coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ pub struct RadarAxisName {
overflow: Option<String>,
}

impl Default for RadarAxisName {
fn default() -> Self {
Self::new()
}
}

impl RadarAxisName {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -307,6 +313,12 @@ pub struct RadarIndicator {
color: Option<Color>,
}

impl Default for RadarIndicator {
fn default() -> Self {
Self::new()
}
}

impl RadarIndicator {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -417,6 +429,12 @@ pub struct RadarCoordinate {
indicator: Vec<RadarIndicator>,
}

impl Default for RadarCoordinate {
fn default() -> Self {
Self::new()
}
}

impl RadarCoordinate {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/radius_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ pub struct RadiusAxis {
data: Vec<String>,
}

impl Default for RadiusAxis {
fn default() -> Self {
Self::new()
}
}

impl RadiusAxis {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/single_axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ pub struct SingleAxis {
max: Option<String>,
}

impl Default for SingleAxis {
fn default() -> Self {
Self::new()
}
}

impl SingleAxis {
pub fn new() -> Self {
Self {
Expand Down
6 changes: 6 additions & 0 deletions charming/src/component/title.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ pub struct Title {
shadow_offset_y: Option<f64>,
}

impl Default for Title {
fn default() -> Self {
Self::new()
}
}

impl Title {
pub fn new() -> Self {
Self {
Expand Down
Loading

0 comments on commit ee1a79d

Please sign in to comment.