Use `use` instead of `pub use` to import modules on the examples.

This commit is contained in:
Sébastien Crozet 2013-10-06 19:36:59 +02:00
parent ee2db8da99
commit 3f99bd62c6
2 changed files with 8 additions and 8 deletions

View File

@ -9,25 +9,25 @@
## Using **nalgebra** ## Using **nalgebra**
All the functionalities of **nalgebra** are grouped in one place: the `na` module. All the functionalities of **nalgebra** are grouped in one place: the `na` module.
This module re-exports everything and includes free functions for all traits methods. This module re-exports everything and includes free functions for all traits methods.
Free functions are useful if you prefer doing something like: `na::dot(v1, v2)` instead of Free functions are useful if you prefer doing something like `na::dot(v1, v2)` instead of
`v1.dot(v2)`. `v1.dot(v2)`.
* You can import the whole prelude, including free functions, using: * You can import the whole prelude, including free functions, using:
```.rust ```.rust
pub use nalgebra::na::*; use nalgebra::na::*;
``` ```
* If you dont want to import everything but only every trait: * If you dont want to import everything but only every trait:
```.rust ```.rust
pub use nalgebra::traits::*; use nalgebra::traits::*;
``` ```
* If you dont want to import everything but only every structure: * If you dont want to import everything but only every structure:
```.rust ```.rust
pub use nalgebra::structs::*; use nalgebra::structs::*;
``` ```
Of course, you can still import `nalgebra::na` alone, and get anything you want using the `na` Of course, you can still import `nalgebra::na` alone, and get anything you want using the `na`
prefix. prefix.

View File

@ -10,25 +10,25 @@
## Using **nalgebra** ## Using **nalgebra**
All the functionalities of **nalgebra** are grouped in one place: the `na` module. All the functionalities of **nalgebra** are grouped in one place: the `na` module.
This module re-exports everything and includes free functions for all traits methods. This module re-exports everything and includes free functions for all traits methods.
Free functions are useful if you prefer doing something like: `na::dot(v1, v2)` instead of Free functions are useful if you prefer doing something like `na::dot(v1, v2)` instead of
`v1.dot(v2)`. `v1.dot(v2)`.
* You can import the whole prelude, including free functions, using: * You can import the whole prelude, including free functions, using:
```.rust ```.rust
pub use nalgebra::na::*; use nalgebra::na::*;
``` ```
* If you dont want to import everything but only every trait: * If you dont want to import everything but only every trait:
```.rust ```.rust
pub use nalgebra::traits::*; use nalgebra::traits::*;
``` ```
* If you dont want to import everything but only every structure: * If you dont want to import everything but only every structure:
```.rust ```.rust
pub use nalgebra::structs::*; use nalgebra::structs::*;
``` ```
Of course, you can still import `nalgebra::na` alone, and get anything you want using the `na` Of course, you can still import `nalgebra::na` alone, and get anything you want using the `na`
prefix. prefix.