Skip to content

Commit

Permalink
use arrayvec instead of heapless
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Oct 2, 2023
1 parent f157b1a commit 57bd437
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 86 deletions.
88 changes: 7 additions & 81 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"cargo",
"api/*",
"support/*",
"components/*"
# "components/*"
]
default-members = ["cargo", "support/tool"]
exclude = ["cargo/tests/crates/**/*"]
Expand Down
5 changes: 3 additions & 2 deletions api/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bindings-derive-constparamty = [] # derive `ConstParamTy`


[dependencies]
heapless = "0.7"
arrayvec = { version = "0.7.4", default-features = false }


[build-dependencies]
Expand Down Expand Up @@ -98,12 +98,13 @@ cargo-args = [
name = "hello-world"
crate-type = ["dylib", "staticlib"]
path = "examples/hello-world.rs"
required-features = ["lang-items"]

[[example]]
name = "handler"
crate-type = ["dylib", "staticlib"]
path = "examples/handler.rs"
required-features = ["entry-point"]
required-features = ["lang-items", "entry-point"]

[package.metadata.playdate]
bundle-id = "rs.playdate.sys"
4 changes: 2 additions & 2 deletions api/sys/src/sys/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

use core::panic::PanicInfo;
use core::fmt::Write;
use heapless::String;
use arrayvec::ArrayString;
use super::proc::error;


#[panic_handler]
fn panic(#[allow(unused)] panic_info: &PanicInfo) -> ! {
let mut output = String::<1024>::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 57bd437

Please sign in to comment.