From 83d7d2ab5d2d9152d69f479da8d401e9a3444d22 Mon Sep 17 00:00:00 2001 From: Egor Larionov Date: Wed, 7 Jun 2023 20:30:05 -0700 Subject: [PATCH] Update readme example with current API Fixes #32 --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d16e9e8..a8693f7 100644 --- a/README.md +++ b/README.md @@ -34,17 +34,16 @@ Below we load a VTK file named `tet.vtk`, modify it and write it back in Legacy ```rust use vtkio::model::*; // import model definition of a VTK file -use vtkio::{import, export_ascii}; fn main() { use std::path::PathBuf; let file_path = PathBuf::from("assets/tet.vtk"); - let mut vtk_file = import(&file_path) + let mut vtk_file = Vtk::import(&file_path) .expect(&format!("Failed to load file: {:?}", file_path)); vtk_file.version = Version::new((4,2)); // arbitrary change - export_ascii(vtk_file, &file_path) + vtk_file.export_ascii(&file_path) .expect(&format!("Failed to save file: {:?}", file_path)); } ```