Skip to content

Commit bbcb94d

Browse files
authored
Remove two trusted in leasable_buffer.rs (#41)
1 parent 51fac1e commit bbcb94d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/src/utilities/leasable_buffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl<'a, T> SubSliceMut<'a, T> {
326326
/// s.slice(0..250);
327327
/// network.send(s);
328328
/// ```
329-
#[flux_rs::trusted(reason = "assignment might me unsafe & arithmetic may overflow")]
329+
#[flux_rs::spec(fn(self: &mut Self, range: R) ensures self: Self)]
330330
pub fn slice<R: RangeBounds<usize>>(&mut self, range: R) {
331331
let start = match range.start_bound() {
332332
Bound::Included(s) => *s,
@@ -451,7 +451,7 @@ impl<'a, T> SubSlice<'a, T> {
451451
/// s.slice(0..250);
452452
/// network.send(s);
453453
/// ```
454-
#[flux_rs::trusted(reason = "assignment might be unsafe & arithmetic may overflow")]
454+
#[flux_rs::spec(fn(self: &mut Self, range: R) ensures self: Self)]
455455
pub fn slice<R: RangeBounds<usize>>(&mut self, range: R) {
456456
let start = match range.start_bound() {
457457
Bound::Included(s) => *s,

0 commit comments

Comments
 (0)