Skip to content

Commit c37e14c

Browse files
committed
[add] return statements.
1 parent 03e1104 commit c37e14c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

crates/lambda-rs/src/render/texture.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ pub enum FilterMode {
5050

5151
impl FilterMode {
5252
fn to_platform(self) -> platform::FilterMode {
53-
match self {
53+
return match self {
5454
FilterMode::Nearest => platform::FilterMode::Nearest,
5555
FilterMode::Linear => platform::FilterMode::Linear,
56-
}
56+
};
5757
}
5858
}
5959

@@ -67,11 +67,11 @@ pub enum AddressMode {
6767

6868
impl AddressMode {
6969
fn to_platform(self) -> platform::AddressMode {
70-
match self {
70+
return match self {
7171
AddressMode::ClampToEdge => platform::AddressMode::ClampToEdge,
7272
AddressMode::Repeat => platform::AddressMode::Repeat,
7373
AddressMode::MirrorRepeat => platform::AddressMode::MirrorRepeat,
74-
}
74+
};
7575
}
7676
}
7777
#[derive(Debug, Clone)]
@@ -179,13 +179,16 @@ impl TextureBuilder {
179179
platform::TextureBuilder::new_3d(self.format.to_platform())
180180
.with_size_3d(self.width, self.height, self.depth)
181181
};
182+
182183
if let Some(ref label) = self.label {
183184
builder = builder.with_label(label);
184185
}
186+
185187
if let Some(ref pixels) = self.data {
186188
builder = builder.with_data(pixels);
187189
}
188-
match builder.build(render_context.gpu()) {
190+
191+
return match builder.build(render_context.gpu()) {
189192
Ok(texture) => Ok(Texture {
190193
inner: Rc::new(texture),
191194
}),
@@ -198,7 +201,7 @@ impl TextureBuilder {
198201
Err(platform::TextureBuildError::Overflow) => {
199202
Err("Overflow while computing texture layout")
200203
}
201-
}
204+
};
202205
}
203206
}
204207

0 commit comments

Comments
 (0)