Skip to content

Commit

Permalink
serde_sv2: refactor to std logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Georges Palauqui committed Oct 19, 2024
1 parent 6a2955e commit dc4c6cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion protocols/v2/binary-sv2/serde-sv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ serde = { version = "1.0.89", features = ["derive", "alloc"], default-features =
buffer_sv2 = {version = "^1.0.0", path = "../../../../utils/buffer"}

[features]
no_std = []
default = ["std"]
std = ["serde/std", "buffer_sv2/std"]

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion protocols/v2/binary-sv2/serde-sv2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
//! [rkyv1]: https://docs.rs/rkyv/0.4.3/rkyv
//! [rkyv2]: https://davidkoloski.me/blog/rkyv-is-faster-than/

#![cfg_attr(feature = "no_std", no_std)]
#![cfg_attr(not(feature = "std"), no_std)]

#[macro_use]
extern crate alloc;
Expand Down
2 changes: 1 addition & 1 deletion utils/buffer/src/buffer_pool/mod.rs
Original file line number Diff line number Diff line change
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

0 comments on commit dc4c6cd

Please sign in to comment.