Skip to content

Commit

Permalink
make scatter trace specific types public
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
  • Loading branch information
andrei-ng committed Jan 13, 2025
1 parent e9cba68 commit 232449b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion plotly/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ pub use layout::Layout;
pub use plot::{ImageFormat, Plot, Trace};
// Also provide easy access to modules which contain additional trace-specific types
pub use traces::{
box_plot, contour, heat_map, histogram, image, mesh3d, sankey, scatter_mapbox, surface,
box_plot, contour, heat_map, histogram, image, mesh3d, sankey, scatter, scatter3d,
scatter_mapbox, surface,
};
// Bring the different trace types into the top-level scope
pub use traces::{
Expand Down
4 changes: 2 additions & 2 deletions plotly/src/traces/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub mod mesh3d;
mod ohlc;
pub mod pie;
pub mod sankey;
mod scatter;
mod scatter3d;
pub mod scatter;
pub mod scatter3d;
pub mod scatter_mapbox;
mod scatter_polar;
pub mod surface;
Expand Down
4 changes: 2 additions & 2 deletions plotly_derive/src/field_setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl FieldType {
// Not the best implementation but works in practice

let (type_str_parts, types) = _type_str_parts(field_ty);
if type_str_parts.first().map_or(false, |t| t != "Option") {
if type_str_parts.first().is_some_and(|t| t != "Option") {
return FieldType::NotOption;
}

Expand Down Expand Up @@ -507,7 +507,7 @@ impl FieldReceiver {
attr.path()
.segments
.first()
.map_or(false, |p| p.ident == name)
.is_some_and(|p| p.ident == name)
})
.map(|attr| {
quote![
Expand Down

0 comments on commit 232449b

Please sign in to comment.