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> {
|
||||
let u = unsafe { glow_context().get_uniform_location(self.0, name) };
|
||||
if let Some(u) = u {
|
||||
Some(Uniform(u))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
u.map(Uniform)
|
||||
}
|
||||
|
||||
pub fn attribute_location(&self, name: &str) -> Option<Attribute> {
|
||||
let a = unsafe { glow_context().get_attrib_location(self.0, name) };
|
||||
if let Some(a) = a {
|
||||
Some(Attribute(a as i32))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
a.map(|a| Attribute(a as i32))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue