Fix warnings

This commit is contained in:
Mark Poliakov 2023-12-05 14:55:28 +02:00
parent 0604df7720
commit 197aba7d39
4 changed files with 16 additions and 5 deletions

View File

@ -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)]

View File

@ -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<str> for Path {

View File

@ -17,7 +17,7 @@ impl PathBuf {
Self(String::from(s))
}
pub fn push<P: AsRef<Path>>(&mut self, path: P) {
pub fn push<P: AsRef<Path>>(&mut self, _path: P) {
todo!()
}

View File

@ -51,8 +51,4 @@ impl<const N: usize> PartialEq<&str> for FixedString<N> {
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()
}
}