Skip to content

Commit f3d317e

Browse files
committed
update README & bump version
1 parent d230fd0 commit f3d317e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "proxy-enum"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
authors = ["Moritz Bischof <[email protected]>"]
55
edition = "2018"
66
description = "Emulate dynamic dispatch and sealed classes using a proxy enum, which defers all method calls to its variants."

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ mod proxy {
7272
Animal::Mouse(mouse) => mouse.feed()
7373
}
7474
}
75-
}
75+
}
76+
77+
impl From<Cat> for Animal { /* ... */ }
78+
impl From<Lion> for Animal { /* ... */ }
79+
impl From<Mouse> for Animal { /* ... */ }
7680
}
7781
```
7882
This, however, will only compile if `Cat`, `Lion` and `Mouse` all have a method called `feed`.

0 commit comments

Comments
 (0)