diff --git a/libraries/relib/src/lib.rs b/libraries/relib/src/lib.rs index 6b0ad7d..c02f2cc 100644 --- a/libraries/relib/src/lib.rs +++ b/libraries/relib/src/lib.rs @@ -1,3 +1,12 @@ +#![no_std] + +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; + +extern crate alloc; + #[derive(Debug)] pub struct Path { pub path: Vec, @@ -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());