Skip to content

Commit 3fd500f

Browse files
authored
make scatter trace specific types public (#273)
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent e9cba68 commit 3fd500f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

plotly/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ pub use layout::Layout;
3131
pub use plot::{ImageFormat, Plot, Trace};
3232
// Also provide easy access to modules which contain additional trace-specific types
3333
pub use traces::{
34-
box_plot, contour, heat_map, histogram, image, mesh3d, sankey, scatter_mapbox, surface,
34+
box_plot, contour, heat_map, histogram, image, mesh3d, sankey, scatter, scatter3d,
35+
scatter_mapbox, surface,
3536
};
3637
// Bring the different trace types into the top-level scope
3738
pub use traces::{

plotly/src/traces/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub mod mesh3d;
1212
mod ohlc;
1313
pub mod pie;
1414
pub mod sankey;
15-
mod scatter;
16-
mod scatter3d;
15+
pub mod scatter;
16+
pub mod scatter3d;
1717
pub mod scatter_mapbox;
1818
mod scatter_polar;
1919
pub mod surface;

plotly_derive/src/field_setter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl FieldType {
213213
// Not the best implementation but works in practice
214214

215215
let (type_str_parts, types) = _type_str_parts(field_ty);
216-
if type_str_parts.first().map_or(false, |t| t != "Option") {
216+
if type_str_parts.first().is_some_and(|t| t != "Option") {
217217
return FieldType::NotOption;
218218
}
219219

@@ -507,7 +507,7 @@ impl FieldReceiver {
507507
attr.path()
508508
.segments
509509
.first()
510-
.map_or(false, |p| p.ident == name)
510+
.is_some_and(|p| p.ident == name)
511511
})
512512
.map(|attr| {
513513
quote![

0 commit comments

Comments
 (0)