diff options
| author | Teddy Wing | 2018-10-30 17:15:45 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2018-10-30 17:15:45 +0100 | 
| commit | b69f46ced56fb199c8cdb58742f8babb5d953988 (patch) | |
| tree | a531979cec7b35e6f2f3375e2cea119787240254 /src/prefix_println.rs | |
| parent | d785aad7f3ab68f496205d2dd51aceaf576cee3b (diff) | |
| download | dome-key-map-b69f46ced56fb199c8cdb58742f8babb5d953988.tar.bz2 | |
dome_key_state_load_map_group(): Remove `expect`s
Don't on errors from reading or parsing the mappings file. Instead print
the error and parse an empty mappings string.
Took a lot of doing to get this working because of this error:
    error[E0597]: `dkmap` does not live long enough
      --> src/ffi.rs:72:44
       |
    72 |                     match MapGroup::parse(&dkmap)
       |                                            ^^^^^ borrowed value does not live long enough
    ...
    82 |                 },
       |                 - borrowed value only lives until here
       |
       = note: borrowed value must be valid for the static lifetime...
Finally got tired to trying things and just decided to store the
unparsed mappings string in `State` to get it to live long enough.
Diffstat (limited to 'src/prefix_println.rs')
0 files changed, 0 insertions, 0 deletions
