Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum Value {
- String { offset: u8, size: u8 },
- }
- fn some_function(value1: Value, value2: Value) {
- match (value1, value2) {
- (Value::String{offset: x1, size: x2},
- Value::String{offset: y1, size: y2}) => {},
- _ => {},
- }
- }
- fn main() {
- let x = Value::String {offset: 1, size: 1};
- let y = Value::String {offset: 2, size: 2};
- some_function(x, y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement