diff options
| author | Teddy Wing | 2016-04-24 08:44:04 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-24 08:44:04 -0400 |
| commit | 7c9439bc11ae95b6f2da59eabf2950d15df4d558 (patch) | |
| tree | a7ba31fadb59ee4892822eaee1f6b902154fb71e /src/alias.rs | |
| parent | 66193af4e53799299c04ecf8715e44693f1bff8a (diff) | |
| download | mutt-alias-auto-add-7c9439bc11ae95b6f2da59eabf2950d15df4d558.tar.bz2 | |
`write_to_file` test: Extract append lines to closure
We want to be able to write a test that ensures aliases can be written
to the file even if they don't already exist.
To do this, I want to be able to reuse the code in the helper function.
We can't use the code that appends to the file because this is relevant
only to the `alias_write_to_file_must_write_given_alias_to_file` test
(which I just realised should actually be renamed to something more
specific).
In order to run this code without requiring it to be in the helper
function, extract it to a closure that gets passed to the helper.
We need to pass `alias` into the function explicitly in order to use it
otherwise we get an error on an immutable borrow.
Diffstat (limited to 'src/alias.rs')
0 files changed, 0 insertions, 0 deletions
