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
|
|
@ -6,3 +6,4 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
stuff = "0.1.4"
|
||||||
|
|
|
||||||
22
src/lib.rs
22
src/lib.rs
|
|
@ -1,8 +1,14 @@
|
||||||
#[cfg(test)]
|
#![no_std]
|
||||||
mod tests {
|
#![warn(rust_2018_idioms)]
|
||||||
#[test]
|
#![deny(unsafe_op_in_unsafe_fn)]
|
||||||
fn it_works() {
|
|
||||||
let result = 2 + 2;
|
mod strategy;
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
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