Skip to content

Commit

Permalink
buffer_sv2: is a no_stdcrate by default
Browse files Browse the repository at this point in the history
- only feature `debug` will add `std` dep which is not used by any other crates
- just had to replace `std::hint` by its `core` equivalent
- in `debug` removed a `mut` to clear a warning
  • Loading branch information
Georges Palauqui committed Oct 28, 2024
1 parent be7ca10 commit 45dca98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions utils/buffer/src/buffer_pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl<T: Buffer> Buffer for BufferPool<T> {
"{} {} {}",
self.inner_memory.raw_offset, self.inner_memory.raw_len, self.inner_memory.len
);
let mut res = self.inner_memory.get_data_owned(shared_state, mode);
let res = self.inner_memory.get_data_owned(shared_state, mode);
self.pool_back
.set_len_from_inner_memory(self.inner_memory.len);
println!(
Expand Down Expand Up @@ -684,7 +684,7 @@ impl<T: Buffer> Buffer for BufferPool<T> {
impl<T: Buffer> Drop for BufferPool<T> {
fn drop(&mut self) {
while self.shared_state.load(Ordering::Relaxed) != 0 {
std::hint::spin_loop();
core::hint::spin_loop();

Check warning on line 687 in utils/buffer/src/buffer_pool/mod.rs

View check run for this annotation

Codecov / codecov/patch

utils/buffer/src/buffer_pool/mod.rs#L687

Added line #L687 was not covered by tests
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion utils/buffer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#![cfg_attr(not(feature = "debug"), no_std)]
#![cfg_attr(not(feature = "debug"), no_std)]
//#![feature(backtrace)]

mod buffer;
Expand Down

0 comments on commit 45dca98

Please sign in to comment.