make Mesh::attribute() immutable (#774)

This commit is contained in:
Carter Anderson 2020-11-02 22:54:20 -08:00 committed by GitHub
parent ce1d16d90d
commit 2e2fa4fef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,10 +134,7 @@ impl Mesh {
self.attributes.insert(name.into(), values);
}
pub fn attribute(
&mut self,
name: impl Into<Cow<'static, str>>,
) -> Option<&VertexAttributeValues> {
pub fn attribute(&self, name: impl Into<Cow<'static, str>>) -> Option<&VertexAttributeValues> {
self.attributes.get(&name.into())
}