Deprecate SecureBuffer#to_slice

master
Didactic Drunk 2021-06-16 19:39:15 -07:00
parent bd5e89dcd4
commit abd43f0a1e
2 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,8 @@ jobs:
- name: Install dependencies
run: shards install
- name: Run tests
run: crystal spec -Dpreview_mt --order random --error-on-warnings
run: crystal spec -Dpreview_mt --order random
# run: crystal spec -Dpreview_mt --order random --error-on-warnings
- name: Run bulid
run: shards build -Dpreview_mt
- name: Run format

View File

@ -51,6 +51,8 @@ module Sodium
# Returns key
# May permanently set key to readonly depending on class usage.
# WARNING: Not thread safe unless this object is readonly or readwrite
#
@[Deprecated("Use the Slice provided within a `readonly` or `readwrite` block")]
def to_slice : Bytes
case @state
when State::Noaccess, State::Wiped