build: specify MSRV

This commit is contained in:
Leonora Tindall 2024-03-31 21:42:47 -05:00
parent 890174fd3e
commit 60aa918513
3 changed files with 10 additions and 2 deletions

View File

@ -9,3 +9,4 @@ keywords = ["memory", "slice", "array"]
categories = ["data-structures"] categories = ["data-structures"]
repository = "https://git.nora.codes/nora/nslice" repository = "https://git.nora.codes/nora/nslice"
readme = "README.md" readme = "README.md"
rust-version = "1.56.1"

View File

@ -8,7 +8,7 @@ either exactly or at least some compile-time-known number of values.
This is useful when dealing with a slice whose length you expect to be exactly This is useful when dealing with a slice whose length you expect to be exactly
or at least some particular length; or at least some particular length;
rather than making runtime checks on each access, rather than making runtime checks on each access,
you can check the length once and access values freely with no copying. you can check the length once and access values freely with no copying.
```rust ```rust
# use nslice::MinSlice; # use nslice::MinSlice;
@ -18,8 +18,13 @@ let minslice: &MinSlice<_, 3> = MinSlice::from_slice(slice).unwrap();
assert_eq!(minslice.tail.len(), 3); assert_eq!(minslice.tail.len(), 3);
assert_eq!(minslice.head[0], 1); assert_eq!(minslice.head[0], 1);
assert_eq!(minslice.tail[2], 6); assert_eq!(minslice.tail[2], 6);
``` ```
## MSRV
This project supports Rust 1.56.1 and onward.
## License ## License
This project is licensed MIT. This project is licensed MIT.

2
rust-toolchain.toml Normal file
View File

@ -0,0 +1,2 @@
[toolchain]
channel = "1.56.1"