Skip to content

Commit

Permalink
Merge pull request #70 from parasyte/replace/heapless
Browse files Browse the repository at this point in the history
Replace heapless with the much smaller arrayvec
  • Loading branch information
boozook committed Oct 2, 2023
2 parents 3c99327 + cd11aa4 commit 5b289e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 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
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,10 @@ fn abort_with_addr(addr: usize) -> ! {

#[panic_handler]
fn panic(#[allow(unused)] panic_info: &PanicInfo) -> ! {
use {
core::fmt::Write,
heapless::{consts::*, String},
};
use arrayvec::ArrayString;
use core::fmt::Write;
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 5b289e5

Please sign in to comment.