Skip to content

Commit 5874679

Browse files
Add PR suggestions
1 parent 38e0e48 commit 5874679

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rlbot/src/render.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rlbot_flat::flat::{
44
};
55

66
#[rustfmt::skip]
7-
mod colors {
7+
pub mod colors {
88
use rlbot_flat::flat::Color;
99
pub const TRANSPARENT: Color = Color { r: 0, g: 0, b: 0, a: 0 };
1010
pub const BLACK: Color = Color { r: 0, g: 0, b: 0, a: 255 };
@@ -20,14 +20,14 @@ mod colors {
2020
pub const PURPLE: Color = Color { r: 128, g: 0, b: 128, a: 255 };
2121
pub const TEAL: Color = Color { r: 0, g: 128, b: 128, a: 255 };
2222
}
23-
pub use colors::*;
2423

2524
/// The Renderer allows of easy construction of [RenderGroup]s for in-game debug rendering.
2625
/// When done, call [build] and queue the resulting [RenderGroup] in the packet queue.
2726
///
2827
/// Example:
2928
/// ```ignore
30-
/// use rlbot::render::{Renderer, RED, GREEN, BLUE};
29+
/// use rlbot::render::{Renderer};
30+
/// use rlbot::render::colors::{BLUE, GREEN, RED};
3131
/// let mut draw = Renderer::new(0);
3232
/// draw.line_3d(car.pos, car.pos + car.forward() * 120., RED);
3333
/// draw.line_3d(car.pos, car.pos + car.rightward() * 120., GREEN);
@@ -100,7 +100,7 @@ impl Renderer {
100100
/// Consider using [push] and `..default()` when using multiple default values.
101101
pub fn string_2d(
102102
&mut self,
103-
text: impl Into<String>,
103+
text: String,
104104
x: f32,
105105
y: f32,
106106
scale: f32,
@@ -111,7 +111,7 @@ impl Renderer {
111111
) {
112112
self.group.render_messages.push(
113113
String2D {
114-
text: text.into(),
114+
text,
115115
x,
116116
y,
117117
scale,
@@ -129,7 +129,7 @@ impl Renderer {
129129
/// Consider using [push] and `..default()` when using multiple default values.
130130
pub fn string_3d(
131131
&mut self,
132-
text: impl Into<String>,
132+
text: String,
133133
anchor: impl Into<RenderAnchor>,
134134
scale: f32,
135135
foreground: Color,
@@ -139,7 +139,7 @@ impl Renderer {
139139
) {
140140
self.group.render_messages.push(
141141
String3D {
142-
text: text.into(),
142+
text,
143143
anchor: Box::new(anchor.into()),
144144
scale,
145145
foreground,

0 commit comments

Comments
 (0)