revert const for now
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ use crate::platform::types::c_char;
|
||||
pub struct ByteLiteral;
|
||||
|
||||
impl ByteLiteral {
|
||||
pub const fn cast_unchecked(input: u8) -> c_char {
|
||||
pub fn cast_unchecked(input: u8) -> c_char {
|
||||
match input {
|
||||
b' '..=b'~' => {
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
|
||||
|
||||
@@ -6,7 +6,6 @@ use alloc::{boxed::Box, ffi::CString, string::String};
|
||||
use core::{ptr, str::FromStr};
|
||||
|
||||
use crate::{
|
||||
byte_literal::ByteLiteral,
|
||||
c_str::CStr,
|
||||
error::{Errno, ResultExtPtrMut},
|
||||
fs::File,
|
||||
@@ -16,7 +15,7 @@ use crate::{
|
||||
};
|
||||
|
||||
// Can't use &str because of the mutability
|
||||
static mut C_LOCALE: [c_char; 2] = [ByteLiteral::cast_unchecked(b'C'), 0];
|
||||
static mut C_LOCALE: [c_char; 2] = [b'C' as c_char, 0];
|
||||
|
||||
mod constants;
|
||||
use constants::*;
|
||||
|
||||
Reference in New Issue
Block a user