@@ -188,7 +188,7 @@ impl Figure {
188
188
Python :: with_gil ( |py| {
189
189
let fig = getattr ! ( py, figure, "Figure" )
190
190
. call0 ( py) . unwrap ( ) ;
191
- Ok ( Self { fig : fig . into ( ) } )
191
+ Ok ( Self { fig } )
192
192
} )
193
193
}
194
194
@@ -311,7 +311,7 @@ pub fn figure() -> Result<Figure, Error> {
311
311
let pyplot = PYPLOT . as_ref ( ) ?;
312
312
Python :: with_gil ( |py| {
313
313
let fig = getattr ! ( py, pyplot, "figure" ) . call0 ( py) ?;
314
- Ok ( Figure { fig : fig . into ( ) } )
314
+ Ok ( Figure { fig } )
315
315
} )
316
316
}
317
317
@@ -703,46 +703,39 @@ impl<'a> PlotOptions<'a> {
703
703
704
704
/// Declare methods to set the options assuming `self.options` exists.
705
705
macro_rules! set_plotoptions { ( ) => {
706
- #[ must_use]
707
706
pub fn fmt( mut self , fmt: & ' a str ) -> Self {
708
707
self . options. fmt = fmt;
709
708
self
710
709
}
711
710
712
- #[ must_use]
713
711
pub fn animated( mut self ) -> Self {
714
712
self . options. animated = true ;
715
713
self
716
714
}
717
715
718
- #[ must_use]
719
716
pub fn antialiased( mut self , b: bool ) -> Self {
720
717
self . options. antialiased = b;
721
718
self
722
719
}
723
720
724
721
/// Label the plot with `label`. Note that labels are not shown
725
722
/// by default; one must call [`Axes::legend`] to display them.
726
- #[ must_use]
727
723
pub fn label( mut self , label: impl Into <Cow <' a, str >>) -> Self {
728
724
self . options. label = label. into( ) ;
729
725
self
730
726
}
731
727
732
- #[ must_use]
733
728
pub fn linewidth( mut self , w: f64 ) -> Self {
734
729
self . options. linewidth = Some ( w) ;
735
730
self
736
731
}
737
732
738
- #[ must_use]
739
733
pub fn markersize( mut self , w: f64 ) -> Self {
740
734
self . options. markersize = Some ( w) ;
741
735
self
742
736
}
743
737
744
738
/// Set the color of the plot.
745
- #[ must_use]
746
739
pub fn color( mut self , color: impl Color ) -> Self {
747
740
self . options. color = Some ( color. rgba( ) ) ;
748
741
self
0 commit comments