Fix clippy::manual_map, no longer manual
This commit is contained in:
parent
26a22750d5
commit
c4dac61ab5
|
@ -491,20 +491,12 @@ impl Program {
|
||||||
|
|
||||||
pub fn uniform_location(&self, name: &str) -> Option<Uniform> {
|
pub fn uniform_location(&self, name: &str) -> Option<Uniform> {
|
||||||
let u = unsafe { glow_context().get_uniform_location(self.0, name) };
|
let u = unsafe { glow_context().get_uniform_location(self.0, name) };
|
||||||
if let Some(u) = u {
|
u.map(Uniform)
|
||||||
Some(Uniform(u))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn attribute_location(&self, name: &str) -> Option<Attribute> {
|
pub fn attribute_location(&self, name: &str) -> Option<Attribute> {
|
||||||
let a = unsafe { glow_context().get_attrib_location(self.0, name) };
|
let a = unsafe { glow_context().get_attrib_location(self.0, name) };
|
||||||
if let Some(a) = a {
|
a.map(|a| Attribute(a as i32))
|
||||||
Some(Attribute(a as i32))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue