Skip to content

Commit eca6c4f

Browse files
committed
Conform to nightly formatting rules
1 parent 9be4064 commit eca6c4f

File tree

9 files changed

+303
-318
lines changed

9 files changed

+303
-318
lines changed

gnuplot/examples/color.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ use gnuplot::*;
66

77
mod common;
88

9-
fn color_name<T: Debug>(color: &PlotOption<T>) -> String{
9+
fn color_name<T: Debug>(color: &PlotOption<T>) -> String
10+
{
1011
let s = format!("{:?}", color).replace("ColorOpt(", "");
1112
let mut chars = s.chars();
1213
chars.next_back();
1314
chars.as_str().to_string()
1415
}
1516

16-
fn example(c: Common) {
17+
fn example(c: Common)
18+
{
1719
let x = 0..5;
1820

1921
let colors = [
@@ -44,9 +46,9 @@ fn example(c: Common) {
4446
ax.set_x_range(Fix(-10.0), Auto);
4547
ax.set_legend(Graph(0.6), Graph(0.8), &[], &[Font("Arial", 14.0)]);
4648

47-
4849
let n_colors = colors.len();
49-
for (i, color) in colors.into_iter().enumerate() {
50+
for (i, color) in colors.into_iter().enumerate()
51+
{
5052
ax.box_xy_error_delta(
5153
x.clone(),
5254
iter::repeat((n_colors - 1) - i),
@@ -85,6 +87,7 @@ fn example(c: Common) {
8587
c.show(&mut fg, "rgb_color");
8688
}
8789

88-
fn main() {
90+
fn main()
91+
{
8992
Common::new().map(|c| example(c));
9093
}

gnuplot/examples/inverse_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ fn example(c: Common)
176176

177177
//~ lines(z.clone(), y.clone()).show();
178178

179-
let mut axes = (lines(z.clone(), y.clone()), lines(z.clone(), x.clone()))
180-
.to_axes2d();
179+
let mut axes = (lines(z.clone(), y.clone()), lines(z.clone(), x.clone())).to_axes2d();
181180
axes.title("Test");
182181
axes.x(axis().log_scale(Some(10.)));
183182

184-
if !c.no_show {
183+
if !c.no_show
184+
{
185185
axes.show();
186186
}
187187
}

gnuplot/examples/variable_color.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ static CANDLESTICKS_STR: &str = "1 1.5 2 2.4 4 6.
1818
9 1.5 2 2.4 3 3.5
1919
10 2.7 3 3.5 4 4.3";
2020

21-
fn example(c: Common) {
21+
fn example(c: Common)
22+
{
2223
let data: Vec<Vec<f64>> = CANDLESTICKS_STR
2324
.split("\n")
2425
.map(|line| {
@@ -78,7 +79,8 @@ fn example(c: Common) {
7879
Color(d1.iter().map(argb_formula).collect::<Vec<_>>()),
7980
"VariableARGBString",
8081
),
81-
] {
82+
]
83+
{
8284
let mut fg = Figure::new();
8385
let ax = fg.axes2d();
8486
ax.set_title(
@@ -205,6 +207,7 @@ fn example(c: Common) {
205207
c.show(&mut fg, "variable_palette");
206208
}
207209

208-
fn main() {
210+
fn main()
211+
{
209212
Common::new().map(|c| example(c));
210213
}

0 commit comments

Comments
 (0)