update README

avec
Avril 4 years ago
parent da1ccd15e6
commit bdba08664e
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
[package] [package]
name = "stackalloc" name = "stackalloc"
version = "1.0.0" version = "1.0.1"
homepage = "https://git.flanchan.moe/flanchan/stackalloc-rs" homepage = "https://git.flanchan.moe/flanchan/stackalloc-rs"
repository = "https://github.com/notflan/stackalloc-rs" repository = "https://github.com/notflan/stackalloc-rs"
keywords = ["alloca", "stack", "stack-allocation", "safe"] keywords = ["alloca", "stack", "stack-allocation", "safe"]

@ -41,7 +41,7 @@ stackalloc_with(5, || vec![String::from("string"); 10], |slice| {
assert_eq!(&slice[0][0][..], "string"); assert_eq!(&slice[0][0][..], "string");
}); // The slice's elements will be dropped here }); // The slice's elements will be dropped here
``` ```
# `MaybeUninit` ## `MaybeUninit`
You can get the aligned stack memory directly with no initialisation. You can get the aligned stack memory directly with no initialisation.
```rust ```rust
stackalloc_uninit(5, |slice| { stackalloc_uninit(5, |slice| {

@ -46,7 +46,7 @@
//! }); // The slice's elements will be dropped here //! }); // The slice's elements will be dropped here
//! # } //! # }
//! ``` //! ```
//! # `MaybeUninit` //! ## `MaybeUninit`
//! You can get the aligned stack memory directly with no initialisation. //! You can get the aligned stack memory directly with no initialisation.
//! ``` //! ```
//! # use stackalloc::stackalloc_uninit; //! # use stackalloc::stackalloc_uninit;

Loading…
Cancel
Save