revert const for now

This commit is contained in:
auronandace
2026-06-11 18:10:28 +01:00
parent 4882c450d8
commit 0dc5247ff6
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -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"))]
+1 -2
View File
@@ -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::*;