(function: &'a Function)
| 18 | /// This is a helpful conversion for instantiating a store from a single [Function]. |
| 19 | impl<'a> From<&'a Function> for FunctionStore<'a> { |
| 20 | fn from(function: &'a Function) -> Self { |
| 21 | let mut store = FunctionStore::default(); |
| 22 | store.add(function.name.to_string(), function); |
| 23 | store |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | impl<'a> FunctionStore<'a> { |