Skip to content

Commit 60c25c6

Browse files
committed
Update rust edition and cargo fmt
1 parent 668d781 commit 60c25c6

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pysplashsurf/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[package]
22
name = "pysplashsurf"
33
version = "0.11.0"
4-
edition = "2018"
4+
edition = "2024"
55

66
authors.workspace = true
77
license.workspace = true
88
homepage.workspace = true
99
repository.workspace = true
1010

1111
[dependencies]
12+
splashsurf = { path = "../splashsurf" }
13+
splashsurf_lib = { path = "../splashsurf_lib" }
1214
pyo3 = {version = "0.25.0", features = ["anyhow"]}
1315
numpy = "0.25.0"
1416
ndarray = "0.16.1"
15-
splashsurf = { path = "../splashsurf" }
16-
splashsurf_lib = { path = "../splashsurf_lib" }
17-
fxhash = "0.2.1"
1817
bytemuck = { version = "1.23.0", features = ["extern_crate_alloc"] }
1918
anyhow = "1.0.98"
2019
rayon = "1.10.0"

pysplashsurf/src/aabb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use numpy::{PyArray, PyArray1, PyArray2, PyReadonlyArray2};
2-
use pyo3::{prelude::*, PyResult};
2+
use pyo3::{PyResult, prelude::*};
33
use pyo3_stub_gen::derive::*;
4-
use splashsurf_lib::{nalgebra::Vector3, Aabb3d};
4+
use splashsurf_lib::{Aabb3d, nalgebra::Vector3};
55

66
macro_rules! create_aabb3d_interface {
77
($name: ident, $type: ident) => {

pysplashsurf/src/mesh.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
use ndarray::{Array2, ArrayView, ArrayView2};
22
use numpy::{Element, IntoPyArray, PyArray, PyArray2, PyArrayMethods, PyReadonlyArray2, ToPyArray};
33
use pyo3::{
4+
IntoPyObjectExt,
45
exceptions::PyValueError,
56
prelude::*,
67
types::{PyDict, PyList, PyTuple},
7-
IntoPyObjectExt,
88
};
99
use pyo3_stub_gen::derive::*;
1010
use splashsurf_lib::{
11+
Real,
1112
mesh::{
1213
AttributeData, Mesh3d, MeshAttribute, MeshWithData, MixedTriQuadMesh3d, TriMesh3d,
1314
TriangleOrQuadCell,
1415
},
1516
nalgebra::{Unit, Vector3},
16-
Real,
1717
};
1818

1919
use crate::aabb::{Aabb3dF32, Aabb3dF64};

pysplashsurf/src/pipeline.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ use pyo3::{
77
};
88
use rayon::iter::{IndexedParallelIterator, IntoParallelRefIterator, ParallelIterator};
99
use splashsurf_lib::{
10+
Aabb3d, Index, Real, SurfaceReconstruction,
1011
mesh::{AttributeData, Mesh3d, MeshAttribute, MeshWithData, TriMesh3d},
1112
nalgebra::{Unit, Vector3},
1213
profile,
1314
sph_interpolation::SphInterpolator,
14-
Aabb3d, Index, Real, SurfaceReconstruction,
1515
};
1616
use std::borrow::Cow;
1717

1818
use crate::{
1919
mesh::{TriMeshWithDataF32, TriMeshWithDataF64},
20-
reconstruction::{reconstruct_surface_py, SurfaceReconstructionF32, SurfaceReconstructionF64},
20+
reconstruction::{SurfaceReconstructionF32, SurfaceReconstructionF64, reconstruct_surface_py},
2121
};
2222

2323
fn reconstruction_pipeline_generic<I: Index, R: Real>(
@@ -100,7 +100,11 @@ fn reconstruction_pipeline_generic<I: Index, R: Real>(
100100
));
101101
let tris_after = mesh_with_data.mesh.triangles.len();
102102
let verts_after = mesh_with_data.mesh.vertices.len();
103-
info!("Post-processing: Cleanup reduced number of vertices to {:.2}% and number of triangles to {:.2}% of original mesh.", (verts_after as f64 / verts_before as f64) * 100.0, (tris_after as f64 / tris_before as f64) * 100.0)
103+
info!(
104+
"Post-processing: Cleanup reduced number of vertices to {:.2}% and number of triangles to {:.2}% of original mesh.",
105+
(verts_after as f64 / verts_before as f64) * 100.0,
106+
(tris_after as f64 / tris_before as f64) * 100.0
107+
)
104108
}
105109

106110
// Decimate mesh if requested

pysplashsurf/src/reconstruction.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use numpy::{PyArray2, PyReadonlyArray2};
2-
use pyo3::{prelude::*, Bound};
2+
use pyo3::{Bound, prelude::*};
33
use pyo3_stub_gen::derive::*;
44
use splashsurf_lib::{
5-
nalgebra::Vector3, reconstruct_surface, Aabb3d, GridDecompositionParameters, Index, Real,
6-
SpatialDecomposition, SurfaceReconstruction,
5+
Aabb3d, GridDecompositionParameters, Index, Real, SpatialDecomposition, SurfaceReconstruction,
6+
nalgebra::Vector3, reconstruct_surface,
77
};
88

99
use crate::{

pysplashsurf/src/sph_interpolation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use ndarray::{ArrayView, ArrayView2};
22
use numpy::{PyArray2, PyReadonlyArray2, ToPyArray};
3-
use pyo3::{prelude::*, PyResult};
3+
use pyo3::{PyResult, prelude::*};
44
use pyo3_stub_gen::derive::*;
55
use splashsurf_lib::{
66
nalgebra::{Unit, Vector3},

0 commit comments

Comments
 (0)