forked from AbleOS/ableos_userland
update relib to be no_std
parent
c6c4358c40
commit
f4603d2f20
|
@ -1,3 +1,12 @@
|
|||
#![no_std]
|
||||
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Path {
|
||||
pub path: Vec<String>,
|
||||
|
@ -5,7 +14,7 @@ pub struct Path {
|
|||
|
||||
impl Path {
|
||||
pub fn new(path: String) -> Self {
|
||||
let mut path_vec_string = vec![];
|
||||
let mut path_vec_string = Vec::new();
|
||||
|
||||
for part in path.split(&['\\', '/'][..]) {
|
||||
path_vec_string.push(part.to_string());
|
||||
|
|
Loading…
Reference in New Issue