diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-30 15:05:41 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-30 15:06:03 -0700 |
| commit | ab4ebdf1751158391100efb0002f40b1d7f6314c (patch) | |
| tree | be675ed7b35164a24bdae5e8f1d3dd73af98490f /lib/file_hash.nom | |
| parent | 7c488dd266466f80e55a3f02050f4e4a019d64b5 (diff) | |
Changed autoformatting rules to ensure tests get clumped together with
the thing below them.
Diffstat (limited to 'lib/file_hash.nom')
| -rw-r--r-- | lib/file_hash.nom | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/file_hash.nom b/lib/file_hash.nom index aef1c78..2f9076e 100644 --- a/lib/file_hash.nom +++ b/lib/file_hash.nom @@ -9,7 +9,6 @@ use "lib/base64.nom" test: assume ((hash "hello world") == "Kq5sNclPz7QV2+lfQIuc6R7oRu0=") - action [hash %, sha1 %]: %hash = (=lua "\%hashlib.new('sha1'):final(\%)") return (base64 %hash) @@ -18,7 +17,6 @@ action [file with hash %hash]: for file %filename in ".": %contents = (read file %filename) %file_hash = (hash %contents) - if (%file_hash == %hash): - return %filename + if (%file_hash == %hash): return %filename parse [hash of file %filename] as (sha1 (read file %filename)) |
