diff --git a/Cargo.toml b/Cargo.toml index 9a84042..152f4b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mbta-rs" -version = "0.3.0" +version = "0.4.0" edition = "2021" authors = ["Robert Yin "] description = "Simple Rust client for interacting with the MBTA V3 API." diff --git a/src/map/mod.rs b/src/map/mod.rs index 99bab3d..4817454 100644 --- a/src/map/mod.rs +++ b/src/map/mod.rs @@ -127,11 +127,11 @@ pub trait Plottable { /// * `map` - mutable reference to a tile map /// * `anti_alias` - whether to render with anti-aliasing or not /// * `plot_style` - plot style for the model - fn plot(self, map: &mut StaticMap, anti_alias: bool, extra_data: D) -> Result<(), PlotError>; + fn plot(&self, map: &mut StaticMap, anti_alias: bool, extra_data: D) -> Result<(), PlotError>; } impl Plottable for Stop { - fn plot(self, map: &mut StaticMap, anti_alias: bool, plot_style: PlotStyle) -> Result<(), PlotError> { + fn plot(&self, map: &mut StaticMap, anti_alias: bool, plot_style: PlotStyle) -> Result<(), PlotError> { if let Some(border_data) = plot_style.border { let border = CircleBuilder::new() .lat_coordinate(self.attributes.latitude) @@ -153,7 +153,7 @@ impl Plottable for Stop { } impl Plottable for Vehicle { - fn plot(self, map: &mut StaticMap, _anti_alias: bool, icon_style: IconStyle) -> Result<(), PlotError> { + fn plot(&self, map: &mut StaticMap, _anti_alias: bool, icon_style: IconStyle) -> Result<(), PlotError> { let icon = IconBuilder::new() .lat_coordinate(self.attributes.latitude) .lon_coordinate(self.attributes.longitude) @@ -167,7 +167,7 @@ impl Plottable for Vehicle { } impl Plottable for Shape { - fn plot(self, map: &mut StaticMap, anti_alias: bool, plot_style: PlotStyle) -> Result<(), PlotError> { + fn plot(&self, map: &mut StaticMap, anti_alias: bool, plot_style: PlotStyle) -> Result<(), PlotError> { let points = decode_polyline(&self.attributes.polyline, 5).map_err(PlotError::PolylineError)?; if let Some(border_data) = plot_style.border { let border = LineBuilder::new()