mirror of
https://github.com/Noratrieb/safe-stuff.git
synced 2026-01-14 16:35:05 +01:00
adaptors
This commit is contained in:
parent
6db7e82491
commit
e67600e818
2 changed files with 15 additions and 8 deletions
22
src/lib.rs
22
src/lib.rs
|
|
@ -1,8 +1,14 @@
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = 2 + 2;
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
#![no_std]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
mod strategy;
|
||||
|
||||
pub use stuff::Backend;
|
||||
|
||||
use crate::strategy::{SafeStrategyAdaptor, SafeStuffingStrategy};
|
||||
|
||||
pub struct StuffedPtr<T, S, B = usize>(stuff::StuffedPtr<T, SafeStrategyAdaptor<S>, B>)
|
||||
where
|
||||
S: SafeStuffingStrategy<B>,
|
||||
B: Backend<T>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue