diff --git a/src/lib.rs b/src/lib.rs index 419b040c..b9fbee4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,10 @@ //! Yggdrasil OS user-kernel communication ABI #![no_std] +#![allow( + clippy::new_without_default, + clippy::should_implement_trait, + clippy::module_inception +)] #![feature(trace_macros, const_trait_impl)] #![deny(missing_docs)] diff --git a/src/path/path.rs b/src/path/path.rs index b5c0f49b..40c3090b 100644 --- a/src/path/path.rs +++ b/src/path/path.rs @@ -66,6 +66,16 @@ impl Path { pub fn is_empty(&self) -> bool { self.0.is_empty() } + + #[inline] + pub fn len(&self) -> usize { + self.0.len() + } + + #[inline] + pub fn as_ptr(&self) -> *const u8 { + self.0.as_ptr() + } } impl AsRef for Path { diff --git a/src/path/path_buf.rs b/src/path/path_buf.rs index 8fd5b337..20a24fe9 100644 --- a/src/path/path_buf.rs +++ b/src/path/path_buf.rs @@ -17,7 +17,7 @@ impl PathBuf { Self(String::from(s)) } - pub fn push>(&mut self, path: P) { + pub fn push>(&mut self, _path: P) { todo!() } diff --git a/src/util.rs b/src/util.rs index 61e00f41..1a7675cd 100644 --- a/src/util.rs +++ b/src/util.rs @@ -51,8 +51,4 @@ impl PartialEq<&str> for FixedString { fn eq(&self, other: &&str) -> bool { &self.data[..self.len] == other.as_bytes() } - - fn ne(&self, other: &&str) -> bool { - &self.data[..self.len] != other.as_bytes() - } }