Skip to content

Commit b4f0511

Browse files
committed
[feature] default implementation of PointDatum for (String, f32).
1 parent 18b895a commit b4f0511

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/views/datum.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,17 @@ impl PointDatum<f32, f32> for (f32, f32, String) {
237237
self.2.clone()
238238
}
239239
}
240+
241+
impl PointDatum<String, f32> for (String, f32) {
242+
fn get_x(&self) -> String {
243+
self.0.clone()
244+
}
245+
246+
fn get_y(&self) -> f32 {
247+
self.1
248+
}
249+
250+
fn get_key(&self) -> String {
251+
String::new()
252+
}
253+
}

0 commit comments

Comments
 (0)