update relib to be no_std

This commit is contained in:
Able 2022-12-06 13:57:06 -06:00
parent 4d4cdaec3b
commit 9e30c1a3fe

View file

@ -1,3 +1,12 @@
#![no_std]
use alloc::{
string::{String, ToString},
vec::Vec,
};
extern crate alloc;
#[derive(Debug)] #[derive(Debug)]
pub struct Path { pub struct Path {
pub path: Vec<String>, pub path: Vec<String>,
@ -5,7 +14,7 @@ pub struct Path {
impl Path { impl Path {
pub fn new(path: String) -> Self { pub fn new(path: String) -> Self {
let mut path_vec_string = vec![]; let mut path_vec_string = Vec::new();
for part in path.split(&['\\', '/'][..]) { for part in path.split(&['\\', '/'][..]) {
path_vec_string.push(part.to_string()); path_vec_string.push(part.to_string());