MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / as_float_mut

Method as_float_mut

splashsurf_lib/src/io/bgeo_format.rs:664–670  ·  view source on GitHub ↗

Returns a mutable reference to the Float storage, panics if it is not the correct variant

(&mut self)

Source from the content-addressed store, hash-verified

662
663 /// Returns a mutable reference to the Float storage, panics if it is not the correct variant
664 pub fn as_float_mut(&mut self) -> &mut Vec<f32> {
665 if let AttributeStorage::Float(v) = self {
666 v
667 } else {
668 panic!("Storage is not an Float storage");
669 }
670 }
671
672 /// Returns a mutable reference to the Vector storage, panics if it is not the correct variant
673 pub fn as_vec_mut(&mut self) -> &mut Vec<f32> {

Callers 1

parseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected