Skip to content

Commit c732707

Browse files
committed
Rename Representation → ContinuousRepresentation
1 parent 31bf08a commit c732707

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/function.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::f64;
1818
use svg;
1919

2020
use axis;
21-
use representation::Representation;
21+
use representation::ContinuousRepresentation;
2222
use svg_render;
2323
use style;
2424

@@ -129,7 +129,7 @@ impl Function {
129129
}
130130
}
131131

132-
impl Representation for Function {
132+
impl ContinuousRepresentation for Function {
133133
fn range(&self, dim: u32) -> (f64, f64) {
134134
match dim {
135135
0 => self.x_range(),

src/histogram.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use axis;
2626
use utils::PairWise;
2727
use svg_render;
2828
use text_render;
29-
use representation::Representation;
29+
use representation::ContinuousRepresentation;
3030
use style;
3131

3232
#[derive(Debug, Default)]
@@ -147,7 +147,7 @@ impl Histogram {
147147
}
148148
}
149149

150-
impl Representation for Histogram {
150+
impl ContinuousRepresentation for Histogram {
151151
fn range(&self, dim: u32) -> (f64, f64) {
152152
match dim {
153153
0 => self.x_range(),

src/line.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use std::f64;
1818
use svg;
1919

2020
use axis;
21-
use representation::Representation;
21+
use representation::ContinuousRepresentation;
2222
use svg_render;
2323
use style;
2424

@@ -116,7 +116,7 @@ impl Line {
116116
}
117117
}
118118

119-
impl Representation for Line {
119+
impl ContinuousRepresentation for Line {
120120
fn range(&self, dim: u32) -> (f64, f64) {
121121
match dim {
122122
0 => self.x_range(),

src/representation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use axis;
1818
/**
1919
A representation of data that is continuous in two dimensions.
2020
*/
21-
pub trait Representation {
21+
pub trait ContinuousRepresentation {
2222
/// The maximum range in each dimension. Used for auto-scaling axes.
2323
fn range(&self, dim: u32) -> (f64, f64);
2424

src/scatter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use svg;
55
use axis;
66
use svg_render;
77
use text_render;
8-
use representation::Representation;
8+
use representation::ContinuousRepresentation;
99
use style;
1010

1111
/// `Style` follows the 'optional builder' pattern
@@ -133,7 +133,7 @@ impl Scatter {
133133
}
134134
}
135135

136-
impl Representation for Scatter {
136+
impl ContinuousRepresentation for Scatter {
137137
fn range(&self, dim: u32) -> (f64, f64) {
138138
match dim {
139139
0 => self.x_range(),

src/view.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::f64;
1212
use svg;
1313
use svg::Node;
1414

15-
use representation::{DiscreteRepresentation, Representation};
15+
use representation::{DiscreteRepresentation, ContinuousRepresentation};
1616
use axis;
1717
use svg_render;
1818
use text_render;
@@ -25,7 +25,7 @@ pub trait View {
2525
/// Standard 1-dimensional view with a continuous x-axis
2626
#[derive(Default)]
2727
pub struct ContinuousView<'a> {
28-
representations: Vec<&'a Representation>,
28+
representations: Vec<&'a ContinuousRepresentation>,
2929
x_range: Option<axis::Range>,
3030
y_range: Option<axis::Range>,
3131
x_label: Option<String>,
@@ -49,7 +49,7 @@ impl<'a> ContinuousView<'a> {
4949
/**
5050
Add a representation to the view
5151
*/
52-
pub fn add(mut self, repr: &'a Representation) -> Self {
52+
pub fn add(mut self, repr: &'a ContinuousRepresentation) -> Self {
5353
self.representations.push(repr);
5454
self
5555
}

0 commit comments

Comments
 (0)