Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::vec::Vec;
- use std::option::Option;
- trait MyTrait {
- fn bar(&self, vec: &Vec<u32>) -> Option<&u32>;
- }
- struct Foo;
- impl MyTrait for Foo {
- fn bar<'a>(&self, vec: &'a Vec<u32>) -> Option<&'a u32> {
- vec.get(0)
- }
- }
- fn main() {}
Add Comment
Please, Sign In to add comment