You can also make a whole module public, to allow access

This commit is contained in:
Stephan Rehfeld
2026-05-13 18:03:19 +02:00
parent 41eb9a9dc0
commit 0a692c01de
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -1,4 +1,2 @@
mod geometry; mod geometry;
mod math; pub mod math;
pub use math::Point3;
+1 -1
View File
@@ -1,4 +1,4 @@
use hello::Point3; use hello::math::Point3;
fn main() { fn main() {
let p = Point3::new(0.0, 0.0, 0.0); let p = Point3::new(0.0, 0.0, 0.0);