Clippy cleanup and module visibility cleanup.
This commit is contained in:
parent
b8861b7f8d
commit
cdd2d585a7
@ -9,9 +9,9 @@ use std::str;
|
|||||||
|
|
||||||
#[derive(Default, Debug, PartialEq, Copy, Clone)]
|
#[derive(Default, Debug, PartialEq, Copy, Clone)]
|
||||||
pub struct Vec3 {
|
pub struct Vec3 {
|
||||||
x: f32,
|
pub x: f32,
|
||||||
y: f32,
|
pub y: f32,
|
||||||
z: f32,
|
pub z: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cross(v1: Vec3, v2: Vec3) -> Vec3 {
|
pub fn cross(v1: Vec3, v2: Vec3) -> Vec3 {
|
||||||
@ -62,7 +62,7 @@ impl fmt::Display for Vec3 {
|
|||||||
impl str::FromStr for Vec3 {
|
impl str::FromStr for Vec3 {
|
||||||
type Err = ParseFloatError;
|
type Err = ParseFloatError;
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
let coords: Vec<&str> = s.split(" ").collect();
|
let coords: Vec<&str> = s.split(' ').collect();
|
||||||
Ok(Vec3 {
|
Ok(Vec3 {
|
||||||
x: coords[0].parse::<f32>()?,
|
x: coords[0].parse::<f32>()?,
|
||||||
y: coords[1].parse::<f32>()?,
|
y: coords[1].parse::<f32>()?,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user