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 clippy warnings #108

Merged
merged 2 commits into from
Oct 28, 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
1 change: 0 additions & 1 deletion charming/src/datatype/dataframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ macro_rules! df {
/// Code below is modified (using df! as reference) from ChatGPT generated code.
/// The main objective of macro dz! is to transpose mixed data type vectors,
/// aka columns or dimensions into ECharts dataframe format.

#[macro_export]
macro_rules! dz {
/*
Expand Down
1 change: 1 addition & 0 deletions charming/src/datatype/datapoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ where

#[derive(Serialize, Debug, PartialEq, PartialOrd, Clone)]
#[serde(untagged)]
#[allow(clippy::large_enum_variant)]
pub enum DataPoint {
Value(CompositeValue),
Item(DataPointItem),
Expand Down
1 change: 1 addition & 0 deletions charming/src/element/mark_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ impl From<(&str, &str)> for MarkLineData {
}

#[derive(Debug, PartialEq, PartialOrd, Clone)]
#[allow(clippy::large_enum_variant)]
pub enum MarkLineVariant {
Simple(MarkLineData),
StartToEnd(MarkLineData, MarkLineData),
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/line/rainfall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn chart() -> Chart {
)
}

const TIME: [&str; 3079] = [
static TIME: [&str; 3079] = [
"2009/6/12\n2:00",
"2009/6/12\n3:00",
"2009/6/12\n4:00",
Expand Down Expand Up @@ -3185,7 +3185,7 @@ const TIME: [&str; 3079] = [
"2009/10/18\n8:00",
];

const FLOW_DATA: [f64; 3079] = [
static FLOW_DATA: [f64; 3079] = [
0.97, 0.96, 0.96, 0.95, 0.95, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
Expand Down Expand Up @@ -3387,7 +3387,7 @@ const FLOW_DATA: [f64; 3079] = [
0.45, 0.45, 0.45,
];

const RAINFALL_DATA: [f64; 3079] = [
static RAINFALL_DATA: [f64; 3079] = [
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0.005, 0.017, 0.017, 0.017, 0.017, 0.011, 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
Expand Down
6 changes: 3 additions & 3 deletions gallery/src/line/rainfall_vs_evaporation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub fn chart() -> Chart {
)
}

const TIME_DATA: [&str; 3079] = [
static TIME_DATA: [&str; 3079] = [
"2009/6/12 2:00",
"2009/6/12 3:00",
"2009/6/12 4:00",
Expand Down Expand Up @@ -3187,7 +3187,7 @@ const TIME_DATA: [&str; 3079] = [
"2009/10/18 8:00",
];

const EVAPORATION_DATA: [f64; 3079] = [
static EVAPORATION_DATA: [f64; 3079] = [
0.97, 0.96, 0.96, 0.95, 0.95, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94, 0.94,
Expand Down Expand Up @@ -3389,7 +3389,7 @@ const EVAPORATION_DATA: [f64; 3079] = [
0.45, 0.45, 0.45,
];

const RAINFALL_DATA: [f64; 3079] = [
static RAINFALL_DATA: [f64; 3079] = [
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0.005, 0.017, 0.017, 0.017, 0.017, 0.011, 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
Expand Down
Loading