Skip to content

Commit

Permalink
Replace heapless with the much smaller arrayvec
Browse files Browse the repository at this point in the history
  • Loading branch information
parasyte committed Oct 2, 2023
1 parent 3c99327 commit cca391f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ crate-type = ["staticlib", "cdylib"]

[dependencies]
anyhow = { version = "1.0.31", default-features = false }
arrayvec = { version = "0.7.4", default-features = false }
crankstart-sys = { version = "0.1.2", path = "crankstart-sys" }
euclid = { version = "0.22.9", default-features = false, features = [ "libm" ] }
hashbrown = "0.14.0"
heapless = "0.6.1"

[dev-dependencies]
randomize = "3.0.1"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ crankstart-sys = { path = "../crankstart/crankstart-sys" }
anyhow = { version = "1.0.31", default-features = false }
euclid = { version = "0.22.9", default-features = false, features = [ "libm" ] }
hashbrown = "0.14.0"
heapless = "0.6.1"

[dependencies.cstr_core]
version = "=0.1.2"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ fn abort_with_addr(addr: usize) -> ! {
#[panic_handler]
fn panic(#[allow(unused)] panic_info: &PanicInfo) -> ! {
use {
arrayvec::ArrayString,
core::fmt::Write,
heapless::{consts::*, String},
};
if let Some(location) = panic_info.location() {
let mut output: String<U1024> = String::new();
let mut output = ArrayString::<1024>::new();
let payload = if let Some(payload) = panic_info.payload().downcast_ref::<&str>() {
payload
} else {
Expand Down

0 comments on commit cca391f

Please sign in to comment.