Update the books
This commit is contained in:
parent
b7bc7fea12
commit
475754d9d9
@ -44,5 +44,8 @@ impl Square {
|
|||||||
field(name = "area", type = "f32"),
|
field(name = "area", type = "f32"),
|
||||||
field(name = "scale", type = "Shape", arg(name = "s", type = "f32"))
|
field(name = "scale", type = "Shape", arg(name = "s", type = "f32"))
|
||||||
)]
|
)]
|
||||||
struct Shape(Circle, Square);
|
enum Shape {
|
||||||
|
Circle(Circle),
|
||||||
|
Square(Square),
|
||||||
|
}
|
||||||
```
|
```
|
@ -40,5 +40,8 @@ impl Square {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Union]
|
#[Union]
|
||||||
struct Shape(Circle, Square);
|
enum Shape {
|
||||||
|
Circle(Circle),
|
||||||
|
Square(Square),
|
||||||
|
}
|
||||||
```
|
```
|
@ -41,5 +41,8 @@ impl Square {
|
|||||||
field(name = "area", type = "f32"),
|
field(name = "area", type = "f32"),
|
||||||
field(name = "scale", type = "Shape", arg(name = "s", type = "f32"))
|
field(name = "scale", type = "Shape", arg(name = "s", type = "f32"))
|
||||||
)]
|
)]
|
||||||
struct Shape(Circle, Square);
|
enum Shape {
|
||||||
|
Circle(Circle),
|
||||||
|
Square(Square),
|
||||||
|
}
|
||||||
```
|
```
|
@ -38,5 +38,8 @@ impl Square {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Union]
|
#[Union]
|
||||||
struct Shape(Circle, Square);
|
enum Shape {
|
||||||
|
Circle(Circle),
|
||||||
|
Square(Square),
|
||||||
|
}
|
||||||
```
|
```
|
Loading…
Reference in New Issue
Block a user