#[derive(Debug)]
struct Point {
x: i32,
y: i32,
}

impl Add<i32> for Point {
type Output = Point;
fn add(self, other: i32) -> Point {
Point {
x: self.x + other,
y: self.y + other,
}
}
}
impl Add for Point {
type Output = Point;
fn add(self, other: Point) -> Point {
Point {
x: self.x + other.x,
y: self.y + other.y,
}
}
}
fn main() {
let mut v:Vec<Vec<Point>> = Vec::new();
v = {
let mut n = Vec::<Vec<Point>>::with_capacity(v.len());
for i in v{
let mut r = Vec::with_capacity(i.len());
for j in i{
r.push(j + 1);
}
n.push(r);
}
n
};
}