Make method name more explicit

This commit is contained in:
Hanno Braun 2022-03-18 15:38:46 +01:00
parent b0d26c0dc9
commit 0b97a1a98a
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ fn main() -> anyhow::Result<()> {
let shape_processor = ShapeProcessor::new(args.tolerance)?; let shape_processor = ShapeProcessor::new(args.tolerance)?;
if let Some(path) = args.export { if let Some(path) = args.export {
let shape = model.load(&parameters)?; let shape = model.load_once(&parameters)?;
let shape = shape_processor.process(&shape); let shape = shape_processor.process(&shape);
let mut mesh_maker = MeshMaker::new(); let mut mesh_maker = MeshMaker::new();

View File

@ -56,7 +56,7 @@ impl Model {
}) })
} }
pub fn load( pub fn load_once(
&self, &self,
arguments: &HashMap<String, String>, arguments: &HashMap<String, String>,
) -> Result<fj::Shape, Error> { ) -> Result<fj::Shape, Error> {
@ -186,7 +186,7 @@ impl Watcher {
pub fn receive(&self) -> Option<fj::Shape> { pub fn receive(&self) -> Option<fj::Shape> {
match self.channel.try_recv() { match self.channel.try_recv() {
Ok(()) => { Ok(()) => {
let shape = match self.model.load(&self.parameters) { let shape = match self.model.load_once(&self.parameters) {
Ok(shape) => shape, Ok(shape) => shape,
Err(Error::Compile) => { Err(Error::Compile) => {
// It would be better to display an error in the UI, // It would be better to display an error in the UI,