Use Self
This commit is contained in:
parent
ec238ff969
commit
df77f814f5
@ -29,7 +29,7 @@ pub struct Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Simulation {
|
impl Simulation {
|
||||||
pub fn new() -> Simulation {
|
pub fn new() -> Self {
|
||||||
let universe = Universe::new();
|
let universe = Universe::new();
|
||||||
let mut world = universe.create_world();
|
let mut world = universe.create_world();
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
@ -48,7 +48,7 @@ impl Simulation {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
Simulation {world}
|
Self {world}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update(&mut self) {
|
pub fn update(&mut self) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user