diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-09-30 15:35:38 -0400 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-09-30 15:36:54 -0400 |
| commit | da07f99d3d81242064722d05eab35b028568fe1f (patch) | |
| tree | bd9b7e23b22e6ef5e2979ee1a2ce69a3d6da1c96 | |
| parent | eef66de68ce1a998f5102dd62868109d20163a2b (diff) | |
| download | invidious-da07f99d3d81242064722d05eab35b028568fe1f.tar.gz invidious-da07f99d3d81242064722d05eab35b028568fe1f.tar.bz2 invidious-da07f99d3d81242064722d05eab35b028568fe1f.zip | |
Bump supported Crystal version
| -rw-r--r-- | shard.yml | 2 | ||||
| -rw-r--r-- | src/invidious/helpers/handlers.cr | 13 |
2 files changed, 1 insertions, 14 deletions
@@ -19,6 +19,6 @@ dependencies: github: kemalcr/kemal version: ~> 0.26.0 -crystal: 0.31.0 +crystal: 0.31.1 license: AGPLv3 diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr index 949eb335..f2240691 100644 --- a/src/invidious/helpers/handlers.cr +++ b/src/invidious/helpers/handlers.cr @@ -237,16 +237,3 @@ class HTTP::Client response end end - -struct Crystal::ThreadLocalValue(T) - @values = Hash(Thread, T).new - - def get(&block : -> T) - th = Thread.current - if !@values[th]? - @values[th] = yield - else - @values[th] - end - end -end |
