From f4603d2f202449838ff589c8dee83c4d57238255 Mon Sep 17 00:00:00 2001 From: Able Date: Tue, 6 Dec 2022 13:57:06 -0600 Subject: [PATCH] update relib to be no_std --- libraries/relib/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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());