mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
feat: add no_std
support in appropriate crates
This commit is contained in:
parent
63dacdcc95
commit
9ca1cba504
3 changed files with 4 additions and 3 deletions
|
@ -1,8 +1,10 @@
|
|||
#![no_std]
|
||||
|
||||
pub(crate) const MAX_TEMPLATE_SIZE: usize = 4096;
|
||||
|
||||
/// Converts a zero-terminated buffer of bytes into a UTF-8 string.
|
||||
pub const fn str_from_buffer(buf: &[u8; MAX_TEMPLATE_SIZE]) -> &str {
|
||||
match std::ffi::CStr::from_bytes_until_nul(buf) {
|
||||
match core::ffi::CStr::from_bytes_until_nul(buf) {
|
||||
Ok(cstr) => match cstr.to_str() {
|
||||
Ok(str) => str,
|
||||
Err(_) => panic!("TEMPLATE FAILURE"),
|
||||
|
|
|
@ -3,6 +3,4 @@ name = "next_tuple"
|
|||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#![no_std]
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
pub trait TupleBuilder<Next> {
|
||||
|
|
Loading…
Reference in a new issue