SHARE
TWEET

Untitled

a guest Jan 20th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mod nuconta_hacks {
  2.     pub trait Hackable {
  3.         fn idea(self) -> String;
  4.     }
  5.     pub struct CoolShit<T> {
  6.         cool: T,
  7.     }
  8.     fn coolify<T>(thing: T) -> CoolShit<T> {
  9.         CoolShit { cool: thing }
  10.     }
  11.     fn hack(hack: impl Hackable) -> String {
  12.         hack.idea()
  13.     }
  14.     fn a_ton<T: Clone>(thing: T) -> Vec<T> {
  15.         std::iter::repeat(thing).take(50).collect::<Vec<T>>()
  16.     }
  17.     fn cool_things(idea: impl Hackable) -> Vec<CoolShit<String>> {
  18.         a_ton(
  19.           hack(idea)
  20.         )
  21.         .into_iter()
  22.         .map(coolify)
  23.         .collect()
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top